Packer ARM - regionalReplicaCount

Hi,

If using multiple regions by using the Packer ARM provider, like so:

“replication_regions”: [“regionA”, “regionB”, “regionC”]

And then using the shared_image_gallery_replica_count parameter it states that:

The number of replicas of the Image Version to be created per region.

Isn’t there any way to from Packer, set the regionalReplicaCount and not the “global” one?

I’d like to set different values for the regions, like regionA to 20, regionB to 5 and regionC to 6 directly from within my Packer configuration file.

So, is this actually not possible to do from Packer, with the ARM builder at the moment?

Azure Builder | Integrations | Packer | HashiCorp Developer

Can it be achieved in any other way from within Packer?

Hi @aleqsss this functionality is not supported at the moment but with the support for target_region blocks added in the latest release of the Azure plugin we can add this functionality.

I opened an issue to track this request azure#386. Please feel free to follow this issue and leave any suggestions or clarifying comments there.

I opened a quick PR to add this feature as a draft. I need to test and some documentation. But the changes should be enough satisfy your request. Please feel free to leave any feedback on the change.

Awesome, big thumbs up! :slightly_smiling_face::+1: