Terraform- Resource: aws_apprunner_custom_domain_association

Example Usage

resource "aws_apprunner_custom_domain_association" "example" {
domain_name = "example.com"
service_arn = aws_apprunner_service.example.arn

Argument Reference

  • domain_name - (Required) Custom domain endpoint to association. Specify a base domain e.g., example.com or a subdomain e.g., subdomain.example.com.
  • enable_www_subdomain (Optional) Whether to associate the subdomain with the App Runner service in addition to the base domain. Defaults to true.
  • service_arn - (Required) ARN of the App Runner service.

Attributes Reference

  • id - The domain_name and service_arn separated by a comma (,).
  • certificate_validation_records - A set of certificate CNAME records used for this domain name. See Certificate Validation Records below for more details.
  • dns_target - App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name. Attribute only available if resource created (not imported) with Terraform.

Certificate Validation Records

  • name - Certificate CNAME record name.
  • status - Current state of the certificate CNAME record validation. It should change to SUCCESS after App Runner completes validation with your DNS.
  • type - Record type, always CNAME.
  • value - Certificate CNAME record value.


$ terraform import aws_apprunner_custom_domain_association.example example.com,arn:aws:apprunner:us-east-1:123456789012:service/example-



Consulting Engineer @ MongoDB

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store