Skip to content

Instantly share code, notes, and snippets.

@phivid
Created January 7, 2020 16:36
Show Gist options
  • Save phivid/090ab102d5347c8ead470add8b4e7796 to your computer and use it in GitHub Desktop.
Save phivid/090ab102d5347c8ead470add8b4e7796 to your computer and use it in GitHub Desktop.
data "aws_ssm_parameter" "alb_dns" {
name = "/infra/${var.application}/alb_dns"
}
data "aws_ssm_parameter" "r53_zone_id" {
name = "/infra/base/r53_zone_id"
}
resource "aws_route53_record" "app" {
zone_id = data.aws_ssm_parameter.r53_zone_id.value
name = "${var.application}.${var.domain}"
type = "CNAME"
ttl = "60"
records = [data.aws_ssm_parameter.alb_dns.value]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment