Data Source: aws_apprunner_hosted_zone_id

Use this data source to get the HostedZoneId of an AWS App Runner service deployed in a given region for the purpose of using it in an AWS Route53 Alias record.

Example Usage

data "aws_apprunner_hosted_zone_id" "main" {}

resource "aws_route53_record" "www" {
  zone_id = aws_route53_zone.primary.zone_id
  name    = "example.com"
  type    = "A"

  alias {
    name                   = aws_apprunner_custom_domain_association.main.dns_target
    zone_id                = data.aws_apprunner_hosted_zone_id.main.id
    evaluate_target_health = true
  }
}

Argument Reference

Attribute Reference

This data source exports the following attributes in addition to the arguments above: