-
-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
bug🐛 An issue with the system🐛 An issue with the system
Description
Found a bug? Maybe our Slack Community can help.
Describe the Bug
When you have two SANs that belong to different zones, the module tries to add validation records to the incorrect zone.
Expected Behavior
It should add validation records to zones:
foo.baz.bar.com and bar.com
Steps to Reproduce
Steps to reproduce the behavior:
Say you have these two zones:
zone 1: bar.com
zone 2: foo.baz.bar.com
You want a cert that allows you to use both zones so you do this:
module "acm_request_certificate_east_coast" {
source = "cloudposse/acm-request-certificate/aws"
domain_name = "foo.baz.bar.com"
process_domain_validation_options = true
ttl = "300"
subject_alternative_names = ["*.foo.baz.bar.com", "*.bar.com"]
providers = {
aws = aws.use1
}
}
When I terraform apply, the module does a data lookup for the zone:
baz.bar.com
The expectation is that the zones it should look up:
foo.baz.bar.com
bar.com
Screenshots
N/A
Environment (please complete the following information):
Mac OS
Additional Notes
In chatting on Slack I suggested this:
Instead of trying to guess what zone to put each SAN in, just have the user specify it manually:
module "cert_request" {
subject_alternative_names = [
{
zone_to_lookup = "foo.baz.com",
names = ["a.foo.baz.com", "b.foo.baz.com"]
},
{
zone_to_lookup = "*.baz.com",
names = ["bob.baz.com", "alice.baz.com"]
}
]
# etc etc
Metadata
Metadata
Assignees
Labels
bug🐛 An issue with the system🐛 An issue with the system