File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change 1- locals {
2- acm_certificate_validation_records = [
3- for record in aws_acm_certificate . this . domain_validation_options :
4- {
5- name = record.resource_record_name
6- type = record.resource_record_type
7- value = record.resource_record_value
8- domain = record.domain_name
9- }
10- ]
11- }
12-
131# ###############################################################################
142# ACM Certificate
153# ###############################################################################
@@ -41,16 +29,20 @@ resource "aws_acm_certificate" "this" {
4129# ###############################################################################
4230
4331resource "aws_route53_record" "this" {
44- for_each = local. acm_certificate_validation_records
32+ for_each = {
33+ for record in aws_acm_certificate . this . domain_validation_options : record . domain_name => {
34+ name = record.resource_record_name
35+ type = record.resource_record_type
36+ value = record.resource_record_value
37+ }
38+ }
4539
4640 zone_id = var. record_zone_id
4741 name = each. value . name
4842 type = each. value . type
4943 records = [each . value . value ]
5044 ttl = 60
5145 allow_overwrite = var. record_allow_overwrite
52-
53- depends_on = [aws_acm_certificate . this ]
5446}
5547
5648resource "aws_acm_certificate_validation" "this" {
You can’t perform that action at this time.
0 commit comments