VpcIpv4CidrBlockAssociation

class VpcIpv4CidrBlockAssociation : KotlinCustomResource

Provides a resource to associate additional IPv4 CIDR blocks with a VPC. When a VPC is created, a primary IPv4 CIDR block for the VPC must be specified. The aws.ec2.VpcIpv4CidrBlockAssociation resource allows further IPv4 CIDR blocks to be added to the VPC.

Example Usage

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.VpcIpv4CidrBlockAssociation;
import com.pulumi.aws.ec2.VpcIpv4CidrBlockAssociationArgs;
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 main = new Vpc("main", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var secondaryCidr = new VpcIpv4CidrBlockAssociation("secondaryCidr", VpcIpv4CidrBlockAssociationArgs.builder()
.vpcId(main.id())
.cidrBlock("172.2.0.0/16")
.build());
}
}

Import

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

$ pulumi import aws:ec2/vpcIpv4CidrBlockAssociation:VpcIpv4CidrBlockAssociation example vpc-cidr-assoc-xxxxxxxx

Properties

Link copied to clipboard
val cidrBlock: Output<String>

The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using ipv4_netmask_length.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ipv4IpamPoolId: Output<String>?

The ID of an IPv4 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. Using IPAM you can monitor IP address usage throughout your AWS Organization.

Link copied to clipboard
val ipv4NetmaskLength: Output<Int>?

The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4_ipam_pool_id.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The ID of the VPC to make the association with.