Reviving this thread, since it seems like the closest match to the issue i am seeing.
Running packer 1.4.2 on an ubuntu machine (invoked through a jenkins job, not through the packer plugin on jenkins, but through a shell invocation).
Running azure builder and tried to use shared image gallery replication for all available regions and i run into the following issue -:
Is there a way to stipulate how many replications we want, per region for this image (the --replica-count argument in the azure CLI command for shared image galleries).
[1;36m==> azure: Capturing image ... [0m
[1;36m==> azure: -> Compute ResourceGroupName : 'temp-image-resource-group-215' [0m
[1;36m==> azure: -> Compute Name : 'cbn-img-215' [0m
[1;36m==> azure: -> Compute Location : 'West US' [0m
[1;36m==> azure: -> Image ResourceGroupName : 'cbn-base-image' [0m
[1;36m==> azure: -> Image Name : 'test-cbn-base-image-215' [0m
[1;36m==> azure: -> Image Location : 'westus' [0m
[1;36m==> azure: Publishing to Shared Image Gallery ... [0m
[1;36m==> azure: -> MDI ID used for SIG publish : '/subscriptions/****/resourceGroups/cbn-base-image/providers/Microsoft.Compute/images/test-cbn-base-image-215' [0m
[1;36m==> azure: -> SIG publish resource group : 'cbn-shared-images' [0m
[1;36m==> azure: -> SIG gallery name : 'cbnGallery' [0m
[1;36m==> azure: -> SIG image name : 'cbn-base-beta' [0m
[1;36m==> azure: -> SIG image version : '0.0.215' [0m
[1;36m==> azure: -> SIG replication regions : '[eastus eastus2 westus westeurope eastasia southeastasia japaneast japanwest northcentralus southcentralus centralus northeurope brazilsouth australiaeast australiasoutheast southindia centralindia westindia canadaeast canadacentral westus2 westcentralus uksouth ukwest koreacentral koreasouth francecentral southafricanorth]' [0m
[1;36m==> azure: [0m
[1;31m==> azure: Future#WaitForCompletion: context has been cancelled: StatusCode=200 -- Original Error: context deadline exceeded [0m
[1;36m==> azure:
==> azure: Cleanup requested, deleting resource group ... [0m
[1;36m==> azure: Resource group has been deleted. [0m
[1;31mBuild 'azure' errored: Future#WaitForCompletion: context has been cancelled: StatusCode=200 -- Original Error: context deadline exceeded [0m
==> Some builds didn't complete successfully and had errors:
--> azure: Future#WaitForCompletion: context has been cancelled: StatusCode=200 -- Original Error: context deadline exceeded
JSON file -:
{
"name":"azure",
"client_id": "{{user `az_client_id`}}",
"client_secret": "{{user `az_client_secret`}}",
"subscription_id": "{{user `az_subscription_id`}}",
"image_offer": "UbuntuServer",
"image_publisher": "Canonical",
"image_sku": "18.04-LTS",
"image_version": "18.04.201810030",
"location": "West US",
"os_type": "Linux",
"type": "azure-arm",
"vm_size": "Standard_F16s_v2",
"shared_image_gallery_destination": {
"resource_group": "{{user `az_shrd_resource_group`}}",
"gallery_name": "{{user `az_shrd_gallery_name`}}",
"image_name": "{{user `az_shrd_gallery_img_dfn`}}",
"image_version": "0.0.{{user `build_number`}}",
"replication_regions": ["eastus","eastus2","westus","westeurope","eastasia","southeastasia","japaneast","japanwest","northcentralus","southcentralus","centralus","northeurope","brazilsouth","australiaeast","australiasoutheast","southindia","centralindia","westindia","canadaeast","canadacentral","westus2","westcentralus","uksouth","ukwest","koreacentral","koreasouth","francecentral","southafricanorth"]
},
"managed_image_name": "test-cbn-base-image-{{user `build_number`}}",
"managed_image_resource_group_name": "{{user `az_resource_group`}}",
"temp_compute_name" : "{{user `cbn_image_name`}}",
"temp_resource_group_name" : "{{user `temp_az_resource_group`}}",
"os_disk_size_gb" : 64
},