-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This is a tricky one to explain because it's all over the place. I'm using version 1.0.4 of the module. It might be a collection of separate issues.
- Create a certificate with no SANs. (ie set subject_alternative_names to []) , then try adding an SAN. You'll get a lot of errors like this:
Error: Invalid index
on .terraform/modules/certificate/main.tf line 45, in resource "aws_route53_record" "validation":
45: zone_id = lookup(local.zone_name_to_id_map, lookup(local.domain_to_zone_map, local.cert_validation_domains[count.index]["domain_name"]))
|----------------
| count.index is 1
| local.cert_validation_domains is tuple with 1 element
The given key does not identify an element in this collection value.
- Create a cert with an SAN apply that. Then change the domain and zone in the SAN to something else. It seems it's a bit fragile and sort of blows up. In this example below "OLDDOMAIN.COM" is the domain I originally created in the first apply.
Error: Invalid function argument
on .terraform/modules/certificate/main.tf line 45, in resource "aws_route53_record" "validation":
45: zone_id = lookup(local.zone_name_to_id_map, lookup(local.domain_to_zone_map, local.cert_validation_domains[count.index]["domain_name"]))
|----------------
| local.domain_to_zone_map is object with 2 attributes
Invalid value for "inputMap" parameter: the given object has no attribute
"jeff2.OLDDOMAIN.COM".
Sort of feels like that if you are using this module , it's safer to use it with a "set it and forget it" kind of mentality than being able to change things out. Is that something you've experienced and is sort of a known issue?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels