Andrew Grimberg | 78bc6d5 | 2017-10-13 12:55:05 -0700 | [diff] [blame] | 1 | { |
| 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 Grimberg | 78bc6d5 | 2017-10-13 12:55:05 -0700 | [diff] [blame] | 9 | "distro": null, |
Andrew Grimberg | 80957a8 | 2018-06-29 12:52:14 -0700 | [diff] [blame] | 10 | "cloud_user_data": null, |
| 11 | "ssh_user": null, |
| 12 | "ssh_proxy_host": "" |
Andrew Grimberg | 78bc6d5 | 2017-10-13 12:55:05 -0700 | [diff] [blame] | 13 | }, |
| 14 | "builders": [ |
| 15 | { |
| 16 | "access_key": "{{user `aws_access_key`}}", |
| 17 | "ami_name": "{{user `distro`}} - basebuild - {{isotime \"20060102-1504\"}}", |
| 18 | "instance_type": "t2.micro", |
| 19 | "region": "us-west-2", |
| 20 | "secret_key": "{{user `aws_security_key`}}", |
| 21 | "security_group_id": "{{user `security_group_id`}}", |
| 22 | "source_ami_filter": { |
| 23 | "filters": { |
| 24 | "name": "{{user `source_ami_filter_name`}}", |
| 25 | "root-device-type": "ebs", |
| 26 | "virtualization-type": "hvm" |
| 27 | }, |
| 28 | "most_recent": true, |
| 29 | "owners": ["{{user `source_ami_filter_owner`}}"] |
| 30 | }, |
Andrew Grimberg | 80957a8 | 2018-06-29 12:52:14 -0700 | [diff] [blame] | 31 | "ssh_username": "{{user `ssh_user`}}", |
Andrew Grimberg | 78bc6d5 | 2017-10-13 12:55:05 -0700 | [diff] [blame] | 32 | "subnet_id": "{{user `subnet_id`}}", |
| 33 | "type": "amazon-ebs", |
| 34 | "user_data_file": "{{user `cloud_user_data`}}" |
| 35 | } |
| 36 | ], |
| 37 | "provisioners": [ |
| 38 | { |
| 39 | "type": "shell", |
| 40 | "scripts": [ |
| 41 | "provision/baseline.sh", |
| 42 | "provision/basebuild.sh", |
| 43 | "provision/system_reseal_local_env.sh", |
| 44 | "provision/system_reseal.sh" |
| 45 | ], |
| 46 | "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" |
| 47 | } |
| 48 | ] |
| 49 | } |