Try AWS Native preview for resources not in the classic version.
aws.ec2.VpcIpv6CidrBlockAssociation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testVpc = new Aws.Ec2.Vpc("testVpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var testVpcIpv6CidrBlockAssociation = new Aws.Ec2.VpcIpv6CidrBlockAssociation("testVpcIpv6CidrBlockAssociation", new()
{
Ipv6IpamPoolId = aws_vpc_ipam_pool.Test.Id,
VpcId = testVpc.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testVpc, err := ec2.NewVpc(ctx, "testVpc", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
_, err = ec2.NewVpcIpv6CidrBlockAssociation(ctx, "testVpcIpv6CidrBlockAssociation", &ec2.VpcIpv6CidrBlockAssociationArgs{
Ipv6IpamPoolId: pulumi.Any(aws_vpc_ipam_pool.Test.Id),
VpcId: testVpc.ID(),
})
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.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.VpcIpv6CidrBlockAssociation;
import com.pulumi.aws.ec2.VpcIpv6CidrBlockAssociationArgs;
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 testVpc = new Vpc("testVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var testVpcIpv6CidrBlockAssociation = new VpcIpv6CidrBlockAssociation("testVpcIpv6CidrBlockAssociation", VpcIpv6CidrBlockAssociationArgs.builder()
.ipv6IpamPoolId(aws_vpc_ipam_pool.test().id())
.vpcId(testVpc.id())
.build());
}
}
import pulumi
import pulumi_aws as aws
test_vpc = aws.ec2.Vpc("testVpc", cidr_block="10.0.0.0/16")
test_vpc_ipv6_cidr_block_association = aws.ec2.VpcIpv6CidrBlockAssociation("testVpcIpv6CidrBlockAssociation",
ipv6_ipam_pool_id=aws_vpc_ipam_pool["test"]["id"],
vpc_id=test_vpc.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testVpc = new aws.ec2.Vpc("testVpc", {cidrBlock: "10.0.0.0/16"});
const testVpcIpv6CidrBlockAssociation = new aws.ec2.VpcIpv6CidrBlockAssociation("testVpcIpv6CidrBlockAssociation", {
ipv6IpamPoolId: aws_vpc_ipam_pool.test.id,
vpcId: testVpc.id,
});
resources:
testVpc:
type: aws:ec2:Vpc
properties:
cidrBlock: 10.0.0.0/16
testVpcIpv6CidrBlockAssociation:
type: aws:ec2:VpcIpv6CidrBlockAssociation
properties:
ipv6IpamPoolId: ${aws_vpc_ipam_pool.test.id}
vpcId: ${testVpc.id}
Create VpcIpv6CidrBlockAssociation Resource
new VpcIpv6CidrBlockAssociation(name: string, args: VpcIpv6CidrBlockAssociationArgs, opts?: CustomResourceOptions);
@overload
def VpcIpv6CidrBlockAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
ipv6_cidr_block: Optional[str] = None,
ipv6_ipam_pool_id: Optional[str] = None,
ipv6_netmask_length: Optional[int] = None,
vpc_id: Optional[str] = None)
@overload
def VpcIpv6CidrBlockAssociation(resource_name: str,
args: VpcIpv6CidrBlockAssociationArgs,
opts: Optional[ResourceOptions] = None)
func NewVpcIpv6CidrBlockAssociation(ctx *Context, name string, args VpcIpv6CidrBlockAssociationArgs, opts ...ResourceOption) (*VpcIpv6CidrBlockAssociation, error)
public VpcIpv6CidrBlockAssociation(string name, VpcIpv6CidrBlockAssociationArgs args, CustomResourceOptions? opts = null)
public VpcIpv6CidrBlockAssociation(String name, VpcIpv6CidrBlockAssociationArgs args)
public VpcIpv6CidrBlockAssociation(String name, VpcIpv6CidrBlockAssociationArgs args, CustomResourceOptions options)
type: aws:ec2:VpcIpv6CidrBlockAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcIpv6CidrBlockAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpcIpv6CidrBlockAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpcIpv6CidrBlockAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcIpv6CidrBlockAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcIpv6CidrBlockAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpcIpv6CidrBlockAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The VpcIpv6CidrBlockAssociation resource accepts the following input properties:
- Ipv6Ipam
Pool stringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- Vpc
Id string The ID of the VPC to make the association with.
- Ipv6Cidr
Block string The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- Ipv6Netmask
Length int The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required
- Ipv6Ipam
Pool stringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- Vpc
Id string The ID of the VPC to make the association with.
- Ipv6Cidr
Block string The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- Ipv6Netmask
Length int The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required
- ipv6Ipam
Pool StringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- vpc
Id String The ID of the VPC to make the association with.
- ipv6Cidr
Block String The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6Netmask
Length Integer The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required
- ipv6Ipam
Pool stringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- vpc
Id string The ID of the VPC to make the association with.
- ipv6Cidr
Block string The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6Netmask
Length number The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required
- ipv6_
ipam_ strpool_ id The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- vpc_
id str The ID of the VPC to make the association with.
- ipv6_
cidr_ strblock The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6_
netmask_ intlength The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required
- ipv6Ipam
Pool StringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- vpc
Id String The ID of the VPC to make the association with.
- ipv6Cidr
Block String The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6Netmask
Length Number The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcIpv6CidrBlockAssociation 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 string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing VpcIpv6CidrBlockAssociation Resource
Get an existing VpcIpv6CidrBlockAssociation 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?: VpcIpv6CidrBlockAssociationState, opts?: CustomResourceOptions): VpcIpv6CidrBlockAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ipv6_cidr_block: Optional[str] = None,
ipv6_ipam_pool_id: Optional[str] = None,
ipv6_netmask_length: Optional[int] = None,
vpc_id: Optional[str] = None) -> VpcIpv6CidrBlockAssociation
func GetVpcIpv6CidrBlockAssociation(ctx *Context, name string, id IDInput, state *VpcIpv6CidrBlockAssociationState, opts ...ResourceOption) (*VpcIpv6CidrBlockAssociation, error)
public static VpcIpv6CidrBlockAssociation Get(string name, Input<string> id, VpcIpv6CidrBlockAssociationState? state, CustomResourceOptions? opts = null)
public static VpcIpv6CidrBlockAssociation get(String name, Output<String> id, VpcIpv6CidrBlockAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Ipv6Cidr
Block string The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- Ipv6Ipam
Pool stringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- Ipv6Netmask
Length int The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required- Vpc
Id string The ID of the VPC to make the association with.
- Ipv6Cidr
Block string The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- Ipv6Ipam
Pool stringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- Ipv6Netmask
Length int The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required- Vpc
Id string The ID of the VPC to make the association with.
- ipv6Cidr
Block String The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6Ipam
Pool StringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- ipv6Netmask
Length Integer The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required- vpc
Id String The ID of the VPC to make the association with.
- ipv6Cidr
Block string The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6Ipam
Pool stringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- ipv6Netmask
Length number The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required- vpc
Id string The ID of the VPC to make the association with.
- ipv6_
cidr_ strblock The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6_
ipam_ strpool_ id The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- ipv6_
netmask_ intlength The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required- vpc_
id str The ID of the VPC to make the association with.
- ipv6Cidr
Block String The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using
ipv6_netmask_length
. This parameter is required ifipv6_netmask_length
is not set and he IPAM pool does not haveallocation_default_netmask
set.- ipv6Ipam
Pool StringId The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts.
- ipv6Netmask
Length Number The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a
ipv6_ipam_pool_id
. This parameter is optional if the IPAM pool hasallocation_default_netmask
set, otherwise it orcidr_block
are required- vpc
Id String The ID of the VPC to make the association with.
Import
Using pulumi import
, import aws_vpc_ipv6_cidr_block_association
using the VPC CIDR Association ID. For example:
$ pulumi import aws:ec2/vpcIpv6CidrBlockAssociation:VpcIpv6CidrBlockAssociation example vpc-cidr-assoc-xxxxxxxx
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.