File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ No modules.
4646| [ aws_lb_listener_certificate.main] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_certificate ) | resource |
4747| [ aws_route53_record.caa] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record ) | resource |
4848| [ aws_route53_record.main] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record ) | resource |
49- | [ aws_route53_zone.main] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone ) | data source |
5049
5150## Inputs
5251
@@ -57,7 +56,7 @@ No modules.
5756| domain\_ name | Domain name to associate with the ACM certificate. | ` string ` | n/a | yes |
5857| environment | Environment tag. e.g. prod | ` string ` | n/a | yes |
5958| tags | Tags to be attached to the ACM certificate. | ` map(string) ` | ` {} ` | no |
60- | zone\_ name | The Route53 zone name for which the certificate should be verified and issued. | ` string ` | n/a | yes |
59+ | zone\_ id | The Route53 zone id for which the certificate should be verified and issued. | ` string ` | n/a | yes |
6160
6261## Outputs
6362
Original file line number Diff line number Diff line change 1- data "aws_route53_zone" "main" {
2- name = var. zone_name
3- }
4-
51resource "aws_acm_certificate" "main" {
62 domain_name = var. domain_name
73 validation_method = " DNS"
@@ -21,7 +17,7 @@ resource "aws_route53_record" "main" {
2117 type = dvo.resource_record_type
2218 }
2319 }
24- zone_id = data . aws_route53_zone . main . id
20+ zone_id = var . zone_id
2521 ttl = " 60"
2622 name = each. value . name
2723 type = each. value . type
@@ -45,7 +41,7 @@ resource "aws_lb_listener_certificate" "main" {
4541# https://docs.aws.amazon.com/acm/latest/userguide/troubleshooting-caa.html
4642resource "aws_route53_record" "caa" {
4743 count = length (var. caa_records ) > 0 ? 1 : 0
48- zone_id = data . aws_route53_zone . main . id
44+ zone_id = var . zone_id
4945 name = var. domain_name
5046 type = " CAA"
5147 records = var. caa_records
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ variable "environment" {
1414 description = " Environment tag. e.g. prod"
1515}
1616
17- variable "zone_name " {
17+ variable "zone_id " {
1818 type = string
19- description = " The Route53 zone name for which the certificate should be verified and issued."
19+ description = " The Route53 zone id for which the certificate should be verified and issued."
2020}
2121
2222variable "caa_records" {
You can’t perform that action at this time.
0 commit comments