Closed goloobev closed 4 years ago
Hey @goloobev, thanks for opening and trying HCL2 ! There was a breaking change in Packer that allows to do this. If you use the latest version, it allows to do the following:
region_kms_key_ids = { # see the equal sign
eu-central-1 = "alias/eu-central-1-kms"
}
#this also allows to set
region_kms_key_ids = var.my_region_kms_key_ids
# from a variable like:
variable "my_region_kms_key_ids" {
type = map(string)
default = {
eu-central-1 = "alias/eu-central-1-kms"
}
}
I hope that helps ! I'm closing this issue for now, don't hesitate asking more questions. 🙂
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Feature Description
Add an ability to set
region_kms_key_ids
(or other "map of strings" objects) as variable. Probably something like a dynamic block for Tag/TagsUse Case(s)
I have several packer files for different OS and one variable file for them I want to define list of regions and KMS keys for them in var file.
But I haven't found an ability to do so.