Created
January 25, 2020 01:57
-
-
Save gavincampbell/6b24b858916fb5ea675c9e9e19a405a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"build_location": "uksouth", | |
"build_vm_size": "Standard_DS2_v2", | |
"sp_client_id": "{{env `PACKER_CLIENT_ID`}}", | |
"sp_client_secret": "{{env `PACKER_CLIENT_SECRET`}}", | |
"sp_tenant_id": "{{env `PACKER_TENANT_ID`}}", | |
"sp_subscription_id": "{{env `PACKER_SUBSCRIPTION_ID`}}", | |
"output_resource_group" : "packer-vm-images", | |
"output_image_name_prefix" : "sql-2019-win-2019" | |
}, | |
"builders": [{ | |
"type": "azure-arm", | |
"client_id": "{{user `sp_client_id`}}", | |
"client_secret": "{{user `sp_client_secret`}}", | |
"tenant_id": "{{user `sp_tenant_id`}}", | |
"subscription_id": "{{user `sp_subscription_id`}}", | |
"managed_image_resource_group_name":"{{user `output_resource_group`}}", | |
"managed_image_name": "{{user `output_image_name_prefix`}}-{{isotime | clean_resource_name}}", | |
"os_type": "Windows", | |
"image_publisher": "MicrosoftWindowsServer", | |
"image_offer": "WindowsServer", | |
"image_sku": "2019-Datacenter", | |
"communicator": "winrm", | |
"winrm_use_ssl": true, | |
"winrm_insecure": true, | |
"winrm_timeout": "5m", | |
"winrm_username": "packer", | |
"azure_tags": { | |
"dept": "Engineering", | |
"task": "Image deployment" | |
}, | |
"location": "{{user `build_location`}}", | |
"vm_size": "{{user `build_vm_size`}}" | |
}], | |
"provisioners": [{ | |
"type": "powershell", | |
"inline": [ | |
"Write-Host \"Downloading SQL Server Installation Media\"", | |
"Get-AzureStorageBlobContent -Container \"ContainerName\" -Blob \"Blob\" -Destination \"C:\\test\\\"" | |
] | |
}] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment