Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tdlmatias/d108516f5efa756a12fe683ed9c9fc83 to your computer and use it in GitHub Desktop.
Save tdlmatias/d108516f5efa756a12fe683ed9c9fc83 to your computer and use it in GitHub Desktop.
packer winrm template
{
"variables": {
"client_id": "**",
"client_secret": "*************************",
"resource_group": "***",
"storage_account": "****",
"subscription_id": "**********************",
"object_id": "**************"
},
"builders": [{
"type": "azure-arm",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"resource_group_name": "{{user `resource_group`}}",
"storage_account": "{{user `storage_account`}}",
"subscription_id": "{{user `subscription_id`}}",
"object_id": "{{user `object_id`}}",
"capture_container_name": "images",
"capture_name_prefix": "packer",
"os_type": "Windows",
"image_publisher": "MicrosoftWindowsServer",
"image_offer": "WindowsServer",
"image_sku": "2012-R2-Datacenter",
"communicator": "winrm",
"winrm_use_ssl": "true",
"winrm_insecure": "true",
"winrm_timeout": "3m",
"winrm_username": "packer",
"location": "West US",
"vm_size": "Standard_A2"
}
],
"provisioners": [
{
"type": "powershell",
"inline": [
"dir c:\\",
"hostname"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment