Resource: awsApprunnerCustomDomainAssociation
Manages an App Runner Custom Domain association.
\~> NOTE: After creation, you must use the information in the certificationValidationRecords
attribute to add CNAME records to your Domain Name System (DNS). For each mapped domain name, add a mapping to the target App Runner subdomain (found in the dnsTarget
attribute) and one or more certificate validation records. App Runner then performs DNS validation to verify that you own or control the domain name you associated. App Runner tracks domain validity in a certificate stored in AWS Certificate Manager (ACM).
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.apprunnerCustomDomainAssociation.ApprunnerCustomDomainAssociation(
this,
"example",
{
domainName: "example.com",
serviceArn: "${aws_apprunner_service.example.arn}",
}
);
Argument Reference
The following arguments supported:
domainName
- (Required) Custom domain endpoint to association. Specify a base domain e.g.,exampleCom
or a subdomain e.g.,subdomainExampleCom
.enableWwwSubdomain
(Optional) Whether to associate the subdomain with the App Runner service in addition to the base domain. Defaults totrue
.serviceArn
- (Required) ARN of the App Runner service.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- ThedomainName
andserviceArn
separated by a comma (,
).certificateValidationRecords
- A set of certificate CNAME records used for this domain name. See Certificate Validation Records below for more details.dnsTarget
- 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
The configuration block consists of the following arguments:
name
- Certificate CNAME record name.status
- Current state of the certificate CNAME record validation. It should change tosuccess
after App Runner completes validation with your DNS.type
- Record type, alwayscname
.value
- Certificate CNAME record value.
Import
App Runner Custom Domain Associations can be imported by using the domainName
and serviceArn
separated by a comma (,
), e.g.,