Skip to content

Commit

Permalink
attempt to fix terraform-aws-modules#33
Browse files Browse the repository at this point in the history
  • Loading branch information
mslipets committed Jan 22, 2021
1 parent 3ceb5d2 commit 21249f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
distinct_domain_names = distinct(concat([var.domain_name], [for s in var.subject_alternative_names : replace(s, "*.", "")]))

# Copy domain_validation_options for the distinct domain names
validation_domains = var.create_certificate ? [for k, v in aws_acm_certificate.this[0].domain_validation_options : tomap(v) if contains(local.distinct_domain_names, replace(v.domain_name, "*.", ""))] : []
validation_domains = var.create_certificate ? [for k, v in flatten(aws_acm_certificate.this.*.domain_validation_options) : tomap(v) if contains(local.distinct_domain_names, replace(v.domain_name, "*.", ""))] : []
}

resource "aws_acm_certificate" "this" {
Expand Down

0 comments on commit 21249f7

Please sign in to comment.