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
vpcconfiguration blocks available within theaws.route53.Zoneresource instead.NOTE: This provider provides both this standalone Zone VPC Association resource and exclusive VPC associations defined in-line in the
aws.route53.Zoneresource viavpcconfiguration 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 useignoreChangesin theaws.route53.Zoneresource 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
new ZoneAssociation(name: string, args: ZoneAssociationArgs, opts?: CustomResourceOptions);def ZoneAssociation(resource_name, opts=None, vpc_id=None, vpc_region=None, zone_id=None, __props__=None);func NewZoneAssociation(ctx *Context, name string, args ZoneAssociationArgs, opts ...ResourceOption) (*ZoneAssociation, error)public ZoneAssociation(string name, ZoneAssociationArgs args, CustomResourceOptions? opts = null)- 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:
Outputs
All input properties are implicitly available as output properties. Additionally, the ZoneAssociation resource produces the following output properties:
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): ZoneAssociationstatic 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:
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.