Skip to content

Instantly share code, notes, and snippets.

@nywilken
Created March 4, 2021 21:12
Show Gist options
  • Save nywilken/5b546bacb1ed2db75e0e7766d70637c6 to your computer and use it in GitHub Desktop.
Save nywilken/5b546bacb1ed2db75e0e7766d70637c6 to your computer and use it in GitHub Desktop.
{
"variables": {
"client_id": "{{ env `ARM_CLIENT_ID` }}",
"client_secret": "{{ env `ARM_CLIENT_SECRET` }}",
"object_id": "{{ env `ARM_OBJECT_ID` }}",
"subscription_id": "{{ env `ARM_SUBSCRIPTION_ID` }}",
"tenant_id": "{{ env `ARM_TENANT_ID` }}",
"resource_group_name": "{{ env `ARM_RESOURCE_GROUP_NAME` }}",
"storage_account": "{{ env `ARM_STORAGE_ACCOUNT` }}"
},
"builders": [
{
"type": "azure-arm",
"capture_container_name": "custom-images",
"capture_name_prefix": "packer",
"client_id": "{{ user `client_id` }}",
"client_secret": "{{ user `client_secret` }}",
"object_id": "{{ user `object_id` }}",
"subscription_id": "{{ user `subscription_id` }}",
"tenant_id": "{{ user `tenant_id` }}",
"storage_account": "{{user `storage_account`}}",
"resource_group_name": "{{user `resource_group_name`}}",
"build_resource_group_name": "{{user `resource_group_name`}}",
"os_type": "Windows",
"image_publisher": "MicrosoftWindowsServer",
"image_offer": "WindowsServer",
"image_sku": "2016-Datacenter",
"communicator": "winrm",
"winrm_use_ssl": "true",
"winrm_insecure": "true",
"winrm_timeout": "5m",
"winrm_username": "packer",
"disk_additional_size": ["50", "100"],
"vm_size": "Standard_F64s_v2"
}
],
"provisioners": [
{
"type": "shell-local",
"inline": "echo $WINRMPASS",
"environment_vars": ["WINRMPASS={{ .WinRMPassword}}"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment