-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtemplate.json
61 lines (56 loc) · 1.43 KB
/
template.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"variables": {
"aws_access_key_id": "{{ env `AWS_ACCESS_KEY_ID` }}",
"aws_secret_access_key": "{{ env `AWS_SECRET_ACCESS_KEY` }}",
"region": "{{ env `AWS_REGION` }}",
"image_name": "Windows Image",
"ami_name_prefix": "windows-base"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{ user `aws_access_key_id` }}",
"secret_key": "{{ user `aws_secret_access_key` }}",
"region": "{{user `region`}}",
"spot_price_auto_product": "Windows (Amazon VPC)",
"instance_type": "t2.medium",
"associate_public_ip_address": true,
"user_data_file": "files/configure-source-ssh.ps1",
"source_ami_filter": {
"filters": {
"name": "Windows_Server-2016-English-Full-Base-*",
"root-device-type": "ebs",
"virtualization-type": "hvm"
},
"most_recent": true,
"owners": [
"801119661308"
]
},
"communicator": "ssh",
"ssh_timeout": "10m",
"ssh_username": "Administrator",
"ami_description": "{{ user `image_name` }}",
"ami_name": "{{ user `ami_name_prefix` }}-{{isotime \"2006-01-02-1504\"}}",
"ami_virtualization_type": "hvm",
"snapshot_tags": {
"Name": "{{ user `image_name` }}",
"OS": "Windows-2016"
},
"tags": {
"Name": "{{ user `image_name` }}",
"OS": "Windows-2016"
}
}],
"provisioners": [
{
"type": "powershell",
"inline": [
"echo 'Provision Things Here' | Out-File C:/test.txt"
]
},
{
"type": "powershell",
"script": "files/prepare-image.ps1"
}
]
}