Permalink
Cannot retrieve contributors at this time
{ | |
"variables": { | |
"source_image_family": "var", | |
"machine_type": "var", | |
"region": "var", | |
"zone": "var", | |
"project_id": "var", | |
"service_account_json": "var" | |
}, | |
"builders": [ | |
{ | |
"type": "googlecompute", | |
"project_id": "{{user `project_id`}}", | |
"machine_type": "{{user `machine_type`}}", | |
"source_image_family": "{{user `source_image_family`}}", | |
"region": "{{user `region`}}", | |
"zone": "{{user `zone`}}", | |
"image_description": "Demo Ubuntu Machine Image", | |
"image_name": "u16demo-{{timestamp}}", | |
"disk_size": 16, | |
"disk_type": "pd-ssd", | |
"ssh_username": "root", | |
"account_file": "{{ user `service_account_json`}}" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline": [ | |
"sleep 10", | |
"uname -a", | |
"uptime" | |
] | |
}, | |
{ | |
"type": "shell", | |
"script": "init.sh", | |
"execute_command": "echo 'packer' | sudo -S sh -c '{{ .Vars }} {{ .Path }}'" | |
} | |
] | |
} |