ZoneAssociation

Manages a Route53 Hosted Zone VPC association. VPC associations can only be made on private zones.

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 the aws.route53.Zone resource instead.

NOTE: This provider provides both this standalone Zone VPC Association resource and exclusive VPC associations defined in-line in the aws.route53.Zone resource via vpc 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 use ignoreChanges in the aws.route53.Zone resource to manage additional associations via this resource.

Example Usage

Coming soon!

Coming soon!

import pulumi
import pulumi_aws as aws

primary = aws.ec2.Vpc("primary",
    cidr_block="10.6.0.0/16",
    enable_dns_hostnames=True,
    enable_dns_support=True)
secondary_vpc = aws.ec2.Vpc("secondaryVpc",
    cidr_block="10.7.0.0/16",
    enable_dns_hostnames=True,
    enable_dns_support=True)
example = aws.route53.Zone("example",
    lifecycle={
        "ignoreChanges": [
            "vpcId",
            "vpcRegion",
            "vpcs",
        ],
    },
    vpcs=[{
        "vpc_id": primary.id,
    }])
secondary_zone_association = aws.route53.ZoneAssociation("secondaryZoneAssociation",
    vpc_id=secondary_vpc.id,
    zone_id=example.zone_id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const primary = new aws.ec2.Vpc("primary", {
    cidrBlock: "10.6.0.0/16",
    enableDnsHostnames: true,
    enableDnsSupport: true,
});
const secondaryVpc = new aws.ec2.Vpc("secondary", {
    cidrBlock: "10.7.0.0/16",
    enableDnsHostnames: true,
    enableDnsSupport: true,
});
const example = new aws.route53.Zone("example", {
    // NOTE: The aws_route53_zone vpc argument accepts multiple configuration
    //       blocks. The below usage of the single vpc configuration, the
    //       lifecycle configuration, and the aws_route53_zone_association
    //       resource is for illustrative purposes (e.g. for a separate
    //       cross-account authorization process, which is not shown here).
    vpcs: [{
        vpcId: primary.id,
    }],
}, { ignoreChanges: ["vpcId", "vpcRegion", "vpcs"] });
const secondaryZoneAssociation = new aws.route53.ZoneAssociation("secondary", {
    vpcId: secondaryVpc.id,
    zoneId: example.zoneId,
});

Create a ZoneAssociation Resource

def ZoneAssociation(resource_name, opts=None, vpc_id=None, vpc_region=None, zone_id=None, __props__=None);
name string
The unique name of the resource.
args ZoneAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ZoneAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ZoneAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ZoneAssociation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ZoneAssociation resource accepts the following input properties:

VpcId string

The VPC to associate with the private hosted zone.

ZoneId string

The private hosted zone to associate.

VpcRegion string

The VPC’s region. Defaults to the region of the AWS provider.

VpcId string

The VPC to associate with the private hosted zone.

ZoneId string

The private hosted zone to associate.

VpcRegion string

The VPC’s region. Defaults to the region of the AWS provider.

vpcId string

The VPC to associate with the private hosted zone.

zoneId string

The private hosted zone to associate.

vpcRegion string

The VPC’s region. Defaults to the region of the AWS provider.

vpc_id str

The VPC to associate with the private hosted zone.

zone_id str

The private hosted zone to associate.

vpc_region str

The VPC’s region. Defaults to the region of the AWS provider.

Outputs

All input properties are implicitly available as output properties. Additionally, the ZoneAssociation resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ZoneAssociation Resource

Get an existing ZoneAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ZoneAssociationState, opts?: CustomResourceOptions): ZoneAssociation
static get(resource_name, id, opts=None, vpc_id=None, vpc_region=None, zone_id=None, __props__=None);
func GetZoneAssociation(ctx *Context, name string, id IDInput, state *ZoneAssociationState, opts ...ResourceOption) (*ZoneAssociation, error)
public static ZoneAssociation Get(string name, Input<string> id, ZoneAssociationState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

VpcId string

The VPC to associate with the private hosted zone.

VpcRegion string

The VPC’s region. Defaults to the region of the AWS provider.

ZoneId string

The private hosted zone to associate.

VpcId string

The VPC to associate with the private hosted zone.

VpcRegion string

The VPC’s region. Defaults to the region of the AWS provider.

ZoneId string

The private hosted zone to associate.

vpcId string

The VPC to associate with the private hosted zone.

vpcRegion string

The VPC’s region. Defaults to the region of the AWS provider.

zoneId string

The private hosted zone to associate.

vpc_id str

The VPC to associate with the private hosted zone.

vpc_region str

The VPC’s region. Defaults to the region of the AWS provider.

zone_id str

The private hosted zone to associate.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.