Zone Association Args
Manages a Route53 Hosted Zone VPC association. VPC associations can only be made on private zones. See the aws.route53.VpcAssociationAuthorization
resource for setting up cross-account associations.
NOTE: Unless explicit association ordering is required (e.g., a separate cross-account association authorization), usage of this resource is not recommended. Use the
vpc
configuration blocks available within theaws.route53.Zone
resource instead. NOTE: This provider provides both this standalone Zone VPC Association resource and exclusive VPC associations defined in-line in theaws.route53.Zone
resource viavpc
configuration blocks. At this time, you cannot use those in-line VPC associations in conjunction with this resource and the same zone ID otherwise it will cause a perpetual difference in plan output. You can optionally useignoreChanges
in theaws.route53.Zone
resource to manage additional associations via this resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.route53.Zone;
import com.pulumi.aws.route53.ZoneArgs;
import com.pulumi.aws.route53.inputs.ZoneVpcArgs;
import com.pulumi.aws.route53.ZoneAssociation;
import com.pulumi.aws.route53.ZoneAssociationArgs;
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 primary = new Vpc("primary", VpcArgs.builder()
.cidrBlock("10.6.0.0/16")
.enableDnsHostnames(true)
.enableDnsSupport(true)
.build());
var secondaryVpc = new Vpc("secondaryVpc", VpcArgs.builder()
.cidrBlock("10.7.0.0/16")
.enableDnsHostnames(true)
.enableDnsSupport(true)
.build());
var example = new Zone("example", ZoneArgs.builder()
.vpcs(ZoneVpcArgs.builder()
.vpcId(primary.id())
.build())
.build());
var secondaryZoneAssociation = new ZoneAssociation("secondaryZoneAssociation", ZoneAssociationArgs.builder()
.zoneId(example.zoneId())
.vpcId(secondaryVpc.id())
.build());
}
}
Import
Route 53 Hosted Zone Associations can be imported via the Hosted Zone ID and VPC ID, separated by a colon (:
), e.g.,
$ pulumi import aws:route53/zoneAssociation:ZoneAssociation example Z123456ABCDEFG:vpc-12345678
If the VPC is in a different region than the provider region configuration, the VPC Region can be added to the end. e.g.
$ pulumi import aws:route53/zoneAssociation:ZoneAssociation example Z123456ABCDEFG:vpc-12345678:us-east-2