github.com/StackPointCloud/packer@v0.10.2-0.20180716202532-b28098e0f79b/examples/azure/linux_custom_managed_image.json (about) 1 { 2 "variables": { 3 "client_id": "{{env `ARM_CLIENT_ID`}}", 4 "client_secret": "{{env `ARM_CLIENT_SECRET`}}", 5 "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}" 6 }, 7 "builders": [ 8 { 9 "type": "azure-arm", 10 11 "client_id": "{{user `client_id`}}", 12 "client_secret": "{{user `client_secret`}}", 13 "subscription_id": "{{user `subscription_id`}}", 14 15 "os_type": "Linux", 16 "custom_managed_image_resource_group_name": "MyResourceGroup", 17 "custom_managed_image_name": "MyImage", 18 "managed_image_resource_group_name": "PackerImages", 19 "managed_image_name": "MyImage", 20 21 "azure_tags": { 22 "dept": "engineering", 23 "task": "image deployment" 24 }, 25 26 "location": "West US", 27 "vm_size": "Standard_DS2_v2" 28 } 29 ], 30 "provisioners": [{ 31 "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", 32 "inline": [ 33 "apt-get update", 34 "apt-get upgrade -y", 35 "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync" 36 ], 37 "inline_shebang": "/bin/sh -x", 38 "type": "shell" 39 }] 40 }