Does anybody have a good solution for working with region_kms_key_ids where different environments use different regions?
I've read several posts here like
parameterizing "region_kms_key_ids" and some issues over on Github. The object can't be parameterized or passed in as noted in the thread attached here.
I define ami_regions for each environment in a var-file and use a single packer json file for all environments.
What I had hoped was that region_kms_key_ids could hold a superset of regions to keys and only the regions present in ami_regions would be used.
Instead, I received the error "Region us-east-2 is in region_kms_key_ids but not in ami_regions".
If region_kms_key_ids could be made to act as a superset of ami_regions and ami_regions actually control the copy operation, I think that a number of the issues people have reported over the years might be handled. This sounds safely compatible as well.
Thoughts? Worth writing up on Github?
- Chris