forked from chrisns/packer-encrypt-copy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
packer-winrm-ec2launch-v2.json
38 lines (38 loc) · 1.06 KB
/
packer-winrm-ec2launch-v2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"variables": {
"access_key": "{{env `aws_id`}}",
"secret_key": "{{env `aws_key`}}",
"source_ami": "{{env `ami_id`}}",
"ami_name": "{{env `ami_name`}}",
"region": "{{env `region`}}"
},
"sensitive-variables": ["access_key", "secret_key"],
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `access_key`}}",
"secret_key": "{{user `secret_key`}}",
"region": "{{user `region`}}",
"source_ami": "{{user `source_ami`}}",
"instance_type": "t2.medium",
"encrypt_boot": true,
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_use_ssl": true,
"winrm_insecure": true,
"winrm_port": 5986,
"user_data_file": "./scripts/setupwrm.ps1",
"ami_name": "{{user `ami_name`}} copied from {{user `source_ami`}}"
}
],
"provisioners": [
{
"type": "powershell",
"inline": [
"Set-Location $env:programfiles/amazon/ec2launch",
"./ec2launch.exe reset --clean --block",
"./ec2launch.exe sysprep --clean --block"
]
}
]
}