Skip to content

Commit

Permalink
add public dns record for oracle databases
Browse files Browse the repository at this point in the history
  • Loading branch information
sobostion committed Jan 8, 2025
1 parent 2221e67 commit c0ff2a5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ resource "aws_route53_record" "db_ec2_instance_internal" {
ttl = 60
records = [module.instance.aws_instance.private_dns]
}

resource "aws_route53_record" "db_ec2_instance_public" {
provider = aws.core-vpc
zone_id = var.account_config.route53_external_zone.zone_id
name = var.db_type == "primary" ? "${var.account_info.application_name}-${var.env_name}-${var.db_suffix}-${var.db_count_index}.${var.account_config.dns_suffix}" : "${var.account_info.application_name}-${var.env_name}-${var.db_suffix}-${var.db_count_index + 1}.${var.account_config.dns_suffix}"
type = "CNAME"
ttl = 60
records = [module.instance.aws_instance.private_dns]
}

0 comments on commit c0ff2a5

Please sign in to comment.