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
-
13
1
# ###############################################################################
14
2
# ACM Certificate
15
3
# ###############################################################################
@@ -41,16 +29,20 @@ resource "aws_acm_certificate" "this" {
41
29
# ###############################################################################
42
30
43
31
resource "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
+ }
45
39
46
40
zone_id = var. record_zone_id
47
41
name = each. value . name
48
42
type = each. value . type
49
43
records = [each . value . value ]
50
44
ttl = 60
51
45
allow_overwrite = var. record_allow_overwrite
52
-
53
- depends_on = [aws_acm_certificate . this ]
54
46
}
55
47
56
48
resource "aws_acm_certificate_validation" "this" {
You can’t perform that action at this time.
0 commit comments