Skip to content

Resource: awsVpcIpv6CidrBlockAssociation

Provides a resource to associate additional IPv6 CIDR blocks with a VPC.

The awsVpcIpv6CidrBlockAssociation resource allows IPv6 CIDR blocks to be added to the VPC.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsVpcTest = new aws.vpc.Vpc(this, "test", {
  cidrBlock: "10.0.0.0/16",
});
const awsVpcIpv6CidrBlockAssociationTest =
  new aws.vpcIpv6CidrBlockAssociation.VpcIpv6CidrBlockAssociation(
    this,
    "test_1",
    {
      ipv6IpamPoolId: "${aws_vpc_ipam_pool.test.id}",
      vpcId: awsVpcTest.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcIpv6CidrBlockAssociationTest.overrideLogicalId("test");

Argument Reference

The following arguments are supported:

  • ipv6CidrBlock - (Optional) The IPv6 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using ipv6NetmaskLength. This parameter is required if ipv6NetmaskLength is not set and he IPAM pool does not have allocationDefaultNetmask set.
  • ipv6IpamPoolId - (Required) 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.
  • ipv6NetmaskLength - (Optional) The netmask length of the IPv6 CIDR you want to allocate to this VPC. Requires specifying a ipv6IpamPoolId. This parameter is optional if the IPAM pool has allocationDefaultNetmask set, otherwise it or cidrBlock are required
  • vpcId - (Required) The ID of the VPC to make the association with.

Timeouts

Configuration options:

  • create - (Default 10M)
  • delete - (Default 10M)

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the VPC CIDR association

Import

awsVpcIpv6CidrBlockAssociation can be imported by using the VPC CIDR Association ID, e.g.,

$ terraform import aws_vpc_ipv6_cidr_block_association.example vpc-cidr-assoc-xxxxxxxx