Skip to content

Instantly share code, notes, and snippets.

@ximon18
Created February 16, 2017 15:29
Show Gist options
  • Save ximon18/c3b5c3dfabdb3cf8b7cc9f1ea87f64d7 to your computer and use it in GitHub Desktop.
Save ximon18/c3b5c3dfabdb3cf8b7cc9f1ea87f64d7 to your computer and use it in GitHub Desktop.
Packer input template
{
"variables": {
"client_id": null,
"client_secret": null,
"subscription_id": null
},
"builders": [
{
"type": "azure-arm",
"subscription_id": "{{user `subscription_id`}}",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"resource_group_name": "somergname",
"storage_account": "somesgacc",
"capture_container_name": "somecontainername",
"capture_name_prefix": "somecapnameprefix",
"location": "westeurope",
"os_type": "Linux",
"os_disk_size_gb": 32,
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04.0-LTS",
"vm_size": "Standard_D2_v2",
"ssh_username": "ubuntu"
}
],
"provisioners": [
{
"type": "shell",
"pause_before": "30s",
"inline_shebang": "/bin/bash -ex",
"inline": [
"# Clean the system and make it suitable for reprovisioning",
"sudo -E waagent -verbose -force -deprovision+user"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment