Skip to content

Commit

Permalink
Add dns certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
datalek committed Sep 20, 2023
1 parent 95f436f commit 85090e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .infrastructure/10_dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ resource "aws_route53_record" "devportal_delegate" {
records = each.value
}

locals {
domain_validations_options = setunion(
aws_acm_certificate.website.domain_validation_options,
aws_acm_certificate.auth.domain_validation_options
)
}
resource "aws_route53_record" "certificate" {
for_each = {
for dvo in aws_acm_certificate.website.domain_validation_options : dvo.domain_name => {
for dvo in local.domain_validations_options : dvo.domain_name => {
name = dvo.resource_record_name
record = dvo.resource_record_value
type = dvo.resource_record_type
Expand Down

0 comments on commit 85090e2

Please sign in to comment.