blob: 3972d54675ae763288059716532ffb53772e7a7f [file] [log] [blame]
Andrew Grimberg78bc6d52017-10-13 12:55:05 -07001{
2 "variables": {
3 "aws_access_key": null,
4 "aws_security_key": null,
5 "security_group_id": null,
6 "source_ami_filter_name": null,
7 "source_ami_filter_owner": null,
8 "subnet_id": null,
Andrew Grimberg78bc6d52017-10-13 12:55:05 -07009 "distro": null,
10 "cloud_user_data": null
11 },
12 "builders": [
13 {
14 "access_key": "{{user `aws_access_key`}}",
15 "ami_name": "{{user `distro`}} - baseline - {{isotime \"20060102-1504\"}}",
16 "instance_type": "t2.micro",
17 "region": "us-west-2",
18 "secret_key": "{{user `aws_security_key`}}",
19 "security_group_id": "{{user `security_group_id`}}",
20 "source_ami_filter": {
21 "filters": {
22 "name": "{{user `source_ami_filter_name`}}",
23 "root-device-type": "ebs",
24 "virtualization-type": "hvm"
25 },
26 "most_recent": true,
27 "owners": ["{{user `source_ami_filter_owner`}}"]
28 },
Andrew Grimberg80957a82018-06-29 12:52:14 -070029 "ssh_username": "{{user `ssh_user`}}",
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070030 "subnet_id": "{{user `subnet_id`}}",
31 "type": "amazon-ebs",
32 "user_data_file": "{{user `cloud_user_data`}}"
33 }
34 ],
35 "provisioners": [
36 {
37 "type": "shell",
38 "scripts": [
39 "provision/baseline.sh",
40 "provision/system_reseal_local_env.sh",
41 "provision/system_reseal.sh"
42 ],
43 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
44 }
45 ]
46}