blob: e19bf616c867fd01606cb91a53a36826e88051cd [file] [log] [blame]
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -08001{
2 "variables": {
Zack Williams5a1d17a2020-02-25 10:30:18 -07003 "instance_type": "t2.medium",
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -08004 "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 Williams5a1d17a2020-02-25 10:30:18 -07009 "source_ami_filter_product_code": "",
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080010 "subnet_id": null,
11 "ssh_user": null,
12 "distro": null,
Zack Williams36d66292019-03-09 08:14:02 -070013 "cloud_user_data": null,
14 "arch": "x86_64"
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080015 },
16 "builders": [
17 {
18 "access_key": "{{user `aws_access_key`}}",
Zack Williams36d66292019-03-09 08:14:02 -070019 "ami_name": "{{user `distro`}} - basebuild - {{user `arch`}} - {{isotime \"20060102-1504\"}}",
Zack Williams5a1d17a2020-02-25 10:30:18 -070020 "instance_type": "{{user `instance_type`}}",
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080021 "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 Williams5a1d17a2020-02-25 10:30:18 -070027 "product-code": "{{user `source_ami_filter_product_code`}}",
Zack Williams36d66292019-03-09 08:14:02 -070028 "architecture": "{{user `arch`}}",
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080029 "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}