File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ resource "aws_route53_record" "record" {
2+ for_each = toset (var. endpoints )
3+ zone_id = data. aws_route53_zone . zone . zone_id
4+ name = each. key
5+ type = " A"
6+
7+ alias {
8+ name = var. alb_dns_name
9+ zone_id = var. alb_zone_id
10+ evaluate_target_health = true
11+ }
12+ }
13+
14+ data "aws_acm_certificate" "base_domain_certificate" {
15+ domain = var. base_domain
16+ statuses = [" ISSUED" ]
17+ most_recent = false
18+ }
19+
20+ data "aws_route53_zone" "zone" {
21+ name = var. base_domain
22+ }
Original file line number Diff line number Diff line change 1+ output "certificate_arn" {
2+ description = " ARN of the base domain certificate"
3+ value = data. aws_acm_certificate . base_domain_certificate . arn
4+ }
5+
6+ output "zone_id" {
7+ description = " ID of the Route 53 zone"
8+ value = data. aws_route53_zone . zone . zone_id
9+ }
Original file line number Diff line number Diff line change 1+ variable "base_domain" {
2+ description = " The base domain for the Route 53 zone"
3+ type = string
4+ }
5+
6+ variable "endpoints" {
7+ description = " A list of endpoints for which to create Route 53 records"
8+ type = list (string )
9+ }
10+
11+ variable "alb_dns_name" {
12+ description = " ALB DNS name"
13+ type = string
14+ }
15+
16+ variable "alb_zone_id" {
17+ description = " ALB zone ID"
18+ type = string
19+ }
You can’t perform that action at this time.
0 commit comments