github.com/inloco/packer@v1.3.2/examples/azure/linux_custom_image.json (about) 1 { 2 "variables": { 3 "client_id": "{{env `ARM_CLIENT_ID`}}", 4 "client_secret": "{{env `ARM_CLIENT_SECRET`}}", 5 "resource_group": "{{env `ARM_RESOURCE_GROUP`}}", 6 "storage_account": "{{env `ARM_STORAGE_ACCOUNT`}}", 7 "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}" 8 }, 9 "builders": [ 10 { 11 "type": "azure-arm", 12 13 "client_id": "{{user `client_id`}}", 14 "client_secret": "{{user `client_secret`}}", 15 "resource_group_name": "{{user `resource_group`}}", 16 "storage_account": "{{user `storage_account`}}", 17 "subscription_id": "{{user `subscription_id`}}", 18 19 "capture_container_name": "images", 20 "capture_name_prefix": "packer", 21 22 "os_type": "Linux", 23 "image_url": "https://my-storage-account.blob.core.windows.net/path/to/your/custom/image.vhd", 24 25 "azure_tags": { 26 "dept": "engineering", 27 "task": "image deployment" 28 }, 29 30 "location": "West US", 31 "vm_size": "Standard_DS2_v2" 32 } 33 ], 34 "provisioners": [{ 35 "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", 36 "inline": [ 37 "apt-get update", 38 "apt-get upgrade -y", 39 "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync" 40 ], 41 "inline_shebang": "/bin/sh -x", 42 "type": "shell" 43 }] 44 }