blob: 2f87bd42b5061a607ba35f48344748408e9aecbc [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,
HungWei Chiufee65012022-07-26 14:19:22 -07008 "source_ami_filter_product_code": "",
Andrew Grimberg78bc6d52017-10-13 12:55:05 -07009 "subnet_id": null,
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070010 "distro": null,
Andrew Grimberg80957a82018-06-29 12:52:14 -070011 "cloud_user_data": null,
12 "ssh_user": null,
13 "ssh_proxy_host": ""
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070014 },
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 Chiufee65012022-07-26 14:19:22 -070026 "product-code": "{{user `source_ami_filter_product_code`}}",
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070027 "root-device-type": "ebs",
28 "virtualization-type": "hvm"
29 },
30 "most_recent": true,
31 "owners": ["{{user `source_ami_filter_owner`}}"]
32 },
Andrew Grimberg80957a82018-06-29 12:52:14 -070033 "ssh_username": "{{user `ssh_user`}}",
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070034 "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}