VpcIpv4CidrBlockAssociationArgs

data class VpcIpv4CidrBlockAssociationArgs(val cidrBlock: Output<String>? = null, val ipv4IpamPoolId: Output<String>? = null, val ipv4NetmaskLength: Output<Int>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<VpcIpv4CidrBlockAssociationArgs>

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

Constructors

Link copied to clipboard
constructor(cidrBlock: Output<String>? = null, ipv4IpamPoolId: Output<String>? = null, ipv4NetmaskLength: Output<Int>? = null, vpcId: Output<String>? = null)

Properties

Link copied to clipboard
val cidrBlock: Output<String>? = null

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 ipv4IpamPoolId: Output<String>? = null

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>? = null

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 vpcId: Output<String>? = null

The ID of the VPC to make the association with.

Functions

Link copied to clipboard
open override fun toJava(): VpcIpv4CidrBlockAssociationArgs