Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
Zack Williams | 5a1d17a | 2020-02-25 10:30:18 -0700 | [diff] [blame] | 3 | "instance_type": "t2.medium", |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 4 | "aws_access_key": null, |
| 5 | "aws_security_key": null, |
| 6 | "security_group_id": null, |
| 7 | "source_ami_filter_name": null, |
| 8 | "source_ami_filter_owner": null, |
Zack Williams | 5a1d17a | 2020-02-25 10:30:18 -0700 | [diff] [blame] | 9 | "source_ami_filter_product_code": "", |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 10 | "subnet_id": null, |
| 11 | "ssh_user": null, |
| 12 | "distro": null, |
Zack Williams | 36d6629 | 2019-03-09 08:14:02 -0700 | [diff] [blame] | 13 | "cloud_user_data": null, |
| 14 | "arch": "x86_64" |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 15 | }, |
| 16 | "builders": [ |
| 17 | { |
| 18 | "access_key": "{{user `aws_access_key`}}", |
Zack Williams | 36d6629 | 2019-03-09 08:14:02 -0700 | [diff] [blame] | 19 | "ami_name": "{{user `distro`}} - basebuild - {{user `arch`}} - {{isotime \"20060102-1504\"}}", |
Zack Williams | 5a1d17a | 2020-02-25 10:30:18 -0700 | [diff] [blame] | 20 | "instance_type": "{{user `instance_type`}}", |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 21 | "region": "us-west-2", |
| 22 | "secret_key": "{{user `aws_security_key`}}", |
| 23 | "security_group_id": "{{user `security_group_id`}}", |
| 24 | "source_ami_filter": { |
| 25 | "filters": { |
| 26 | "name": "{{user `source_ami_filter_name`}}", |
Zack Williams | 5a1d17a | 2020-02-25 10:30:18 -0700 | [diff] [blame] | 27 | "product-code": "{{user `source_ami_filter_product_code`}}", |
Zack Williams | 36d6629 | 2019-03-09 08:14:02 -0700 | [diff] [blame] | 28 | "architecture": "{{user `arch`}}", |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 29 | "root-device-type": "ebs", |
| 30 | "virtualization-type": "hvm" |
| 31 | }, |
| 32 | "most_recent": true, |
| 33 | "owners": ["{{user `source_ami_filter_owner`}}"] |
| 34 | }, |
| 35 | "ssh_username": "{{user `ssh_user`}}", |
| 36 | "subnet_id": "{{user `subnet_id`}}", |
| 37 | "type": "amazon-ebs", |
| 38 | "user_data_file": "{{user `cloud_user_data`}}" |
| 39 | } |
| 40 | ], |
| 41 | "provisioners": [ |
| 42 | { |
| 43 | "type": "shell", |
| 44 | "scripts": [ |
| 45 | "provision/baseline.sh", |
| 46 | "provision/basebuild.sh", |
| 47 | "provision/system_reseal_local_env.sh", |
| 48 | "provision/system_reseal.sh" |
| 49 | ], |
| 50 | "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" |
| 51 | } |
| 52 | ] |
| 53 | } |