CustomDomainAssociationArgs

data class CustomDomainAssociationArgs(val domainName: Output<String>? = null, val enableWwwSubdomain: Output<Boolean>? = null, val serviceArn: Output<String>? = null) : ConvertibleToJava<CustomDomainAssociationArgs>

Manages an App Runner Custom Domain association.

NOTE: After creation, you must use the information in the certificate_validation_records 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 dns_target 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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apprunner.CustomDomainAssociation("example", {
domainName: "example.com",
serviceArn: exampleAwsApprunnerService.arn,
});
import pulumi
import pulumi_aws as aws
example = aws.apprunner.CustomDomainAssociation("example",
domain_name="example.com",
service_arn=example_aws_apprunner_service["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AppRunner.CustomDomainAssociation("example", new()
{
DomainName = "example.com",
ServiceArn = exampleAwsApprunnerService.Arn,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apprunner.NewCustomDomainAssociation(ctx, "example", &apprunner.CustomDomainAssociationArgs{
DomainName: pulumi.String("example.com"),
ServiceArn: pulumi.Any(exampleAwsApprunnerService.Arn),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apprunner.CustomDomainAssociation;
import com.pulumi.aws.apprunner.CustomDomainAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CustomDomainAssociation("example", CustomDomainAssociationArgs.builder()
.domainName("example.com")
.serviceArn(exampleAwsApprunnerService.arn())
.build());
}
}
resources:
example:
type: aws:apprunner:CustomDomainAssociation
properties:
domainName: example.com
serviceArn: ${exampleAwsApprunnerService.arn}

Import

Using pulumi import, import App Runner Custom Domain Associations using the domain_name and service_arn separated by a comma (,). For example:

$ pulumi import aws:apprunner/customDomainAssociation:CustomDomainAssociation example example.com,arn:aws:apprunner:us-east-1:123456789012:service/example-app/8fe1e10304f84fd2b0df550fe98a71fa

Constructors

Link copied to clipboard
constructor(domainName: Output<String>? = null, enableWwwSubdomain: Output<Boolean>? = null, serviceArn: Output<String>? = null)

Properties

Link copied to clipboard
val domainName: Output<String>? = null

Custom domain endpoint to association. Specify a base domain e.g., example.com or a subdomain e.g., subdomain.example.com.

Link copied to clipboard
val enableWwwSubdomain: Output<Boolean>? = null

Whether to associate the subdomain with the App Runner service in addition to the base domain. Defaults to true.

Link copied to clipboard
val serviceArn: Output<String>? = null

ARN of the App Runner service.

Functions

Link copied to clipboard
open override fun toJava(): CustomDomainAssociationArgs