@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
108 lines • 4.73 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.VpcIpv6CidrBlockAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to associate additional IPv6 CIDR blocks with a VPC.
*
* The `aws.ec2.VpcIpv6CidrBlockAssociation` resource allows IPv6 CIDR blocks to be added to the VPC.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.ec2.Vpc("test", {cidrBlock: "10.0.0.0/16"});
* const testVpcIpv6CidrBlockAssociation = new aws.ec2.VpcIpv6CidrBlockAssociation("test", {
* ipv6IpamPoolId: testAwsVpcIpamPool.id,
* vpcId: test.id,
* });
* ```
*
* ## Import
*
* or
*
* or
*
* Using `pulumi import`, import `aws_vpc_ipv6_cidr_block_association` using the VPC CIDR association ID and optionally the IPv6 IPAM pool ID and netmask length. For example:
*
* ```sh
* $ pulumi import aws:ec2/vpcIpv6CidrBlockAssociation:VpcIpv6CidrBlockAssociation example vpc-cidr-assoc-0754129087e149dcd
* ```
* or
*
* ```sh
* $ pulumi import aws:ec2/vpcIpv6CidrBlockAssociation:VpcIpv6CidrBlockAssociation example vpc-cidr-assoc-0754129087e149dcd,ipam-pool-0611d1d6bbc05ce60
* ```
* or
*
* ```sh
* $ pulumi import aws:ec2/vpcIpv6CidrBlockAssociation:VpcIpv6CidrBlockAssociation example vpc-cidr-assoc-0754129087e149dcd,ipam-pool-0611d1d6bbc05ce60,56
* ```
*/
class VpcIpv6CidrBlockAssociation extends pulumi.CustomResource {
/**
* Get an existing VpcIpv6CidrBlockAssociation resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new VpcIpv6CidrBlockAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpcIpv6CidrBlockAssociation. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === VpcIpv6CidrBlockAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["assignGeneratedIpv6CidrBlock"] = state?.assignGeneratedIpv6CidrBlock;
resourceInputs["ipSource"] = state?.ipSource;
resourceInputs["ipv6AddressAttribute"] = state?.ipv6AddressAttribute;
resourceInputs["ipv6CidrBlock"] = state?.ipv6CidrBlock;
resourceInputs["ipv6IpamPoolId"] = state?.ipv6IpamPoolId;
resourceInputs["ipv6NetmaskLength"] = state?.ipv6NetmaskLength;
resourceInputs["ipv6Pool"] = state?.ipv6Pool;
resourceInputs["region"] = state?.region;
resourceInputs["vpcId"] = state?.vpcId;
}
else {
const args = argsOrState;
if (args?.vpcId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["assignGeneratedIpv6CidrBlock"] = args?.assignGeneratedIpv6CidrBlock;
resourceInputs["ipv6CidrBlock"] = args?.ipv6CidrBlock;
resourceInputs["ipv6IpamPoolId"] = args?.ipv6IpamPoolId;
resourceInputs["ipv6NetmaskLength"] = args?.ipv6NetmaskLength;
resourceInputs["ipv6Pool"] = args?.ipv6Pool;
resourceInputs["region"] = args?.region;
resourceInputs["vpcId"] = args?.vpcId;
resourceInputs["ipSource"] = undefined /*out*/;
resourceInputs["ipv6AddressAttribute"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcIpv6CidrBlockAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcIpv6CidrBlockAssociation = VpcIpv6CidrBlockAssociation;
/** @internal */
VpcIpv6CidrBlockAssociation.__pulumiType = 'aws:ec2/vpcIpv6CidrBlockAssociation:VpcIpv6CidrBlockAssociation';
//# sourceMappingURL=vpcIpv6CidrBlockAssociation.js.map