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