File tree Expand file tree Collapse file tree 4 files changed +8
-17
lines changed Expand file tree Collapse file tree 4 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,7 @@ module "grafana_backend_rds_security_group" {
377377module "grafana_dns_record" {
378378 source = " ./modules/route-53-record"
379379
380+ zone_id = var. acm_record_zone_id
380381 domain = var. acm_grafana_domain_name
381382 alb_dns_name = module. grafana_ecs_deployment . alb_dns_name
382383 alb_zone_id = module. grafana_ecs_deployment . alb_zone_id
Original file line number Diff line number Diff line change 1- locals {
2- domain_parts = regexall (" (.*\\ .)?(.*\\ ..*)" , var. domain )
3- base_domain = (
4- length (local. domain_parts ) > 0 && length (local. domain_parts [0 ]) > 1 ?
5- local. domain_parts [0 ][1 ] : var. domain )
6- }
7-
81# ###############################################################################
92# ACM Certificate
103# ###############################################################################
114
12- data "aws_route53_zone" "base_domain" {
13- name = local. base_domain
14- }
15-
165resource "aws_route53_record" "this" {
17- zone_id = data . aws_route53_zone . base_domain . zone_id
6+ zone_id = var . zone_id
187 name = var. domain
198 type = " A"
209
Original file line number Diff line number Diff line change @@ -6,8 +6,3 @@ output "id" {
66 description = " Identifier of the Route53 Record"
77 value = aws_route53_record. this . id
88}
9-
10- output "zone_id" {
11- description = " ID of the Route 53 zone"
12- value = data. aws_route53_zone . base_domain . zone_id
13- }
Original file line number Diff line number Diff line change 22# Route53 Record
33# ###############################################################################
44
5+ variable "zone_id" {
6+ description = " (Required) The ID of the hosted zone to contain this record."
7+ type = string
8+ nullable = false
9+ }
10+
511variable "domain" {
612 description = " (Required) Domain name for which the certificate should be issued."
713 type = string
You can’t perform that action at this time.
0 commit comments