Vpc Ipam Pool Cidr Args
Provisions a CIDR from an IPAM address pool.
NOTE: Provisioning Public IPv4 or Public IPv6 require steps outside the scope of this resource. The resource accepts
message
andsignature
as part of thecidr_authorization_context
attribute but those must be generated ahead of time. Public IPv6 CIDRs that are provisioned into a Pool withpublicly_advertisable = true
and all public IPv4 CIDRs also require creating a Route Origin Authorization (ROA) object in your Regional Internet Registry (RIR). NOTE: In order to deprovision CIDRs all Allocations must be released. Allocations created by a VPC take up to 30 minutes to be released. However, for IPAM to properly manage the removal of allocation records created by VPCs and other resources, you must grant it permissions in either a single account or organizationally. If you are unable to deprovision a cidr after waiting over 30 minutes, you may be missing the Service Linked Role.
Example Usage
Basic usage:
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.aws.ec2.VpcIpam;
import com.pulumi.aws.ec2.VpcIpamArgs;
import com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;
import com.pulumi.aws.ec2.VpcIpamPool;
import com.pulumi.aws.ec2.VpcIpamPoolArgs;
import com.pulumi.aws.ec2.VpcIpamPoolCidr;
import com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;
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) {
final var current = AwsFunctions.getRegion();
var exampleVpcIpam = new VpcIpam("exampleVpcIpam", VpcIpamArgs.builder()
.operatingRegions(VpcIpamOperatingRegionArgs.builder()
.regionName(current.applyValue(getRegionResult -> getRegionResult.name()))
.build())
.build());
var exampleVpcIpamPool = new VpcIpamPool("exampleVpcIpamPool", VpcIpamPoolArgs.builder()
.addressFamily("ipv4")
.ipamScopeId(exampleVpcIpam.privateDefaultScopeId())
.locale(current.applyValue(getRegionResult -> getRegionResult.name()))
.build());
var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr("exampleVpcIpamPoolCidr", VpcIpamPoolCidrArgs.builder()
.ipamPoolId(exampleVpcIpamPool.id())
.cidr("172.2.0.0/16")
.build());
}
}
Import
IPAMs can be imported using the <cidr>_<ipam-pool-id>
. Please note we DO NOT use the ipam pool cidr id as this was introduced after the resource already existed. An import example
$ pulumi import aws:ec2/vpcIpamPoolCidr:VpcIpamPoolCidr example 172.2.0.0/24_ipam-pool-0e634f5a1517cccdc
Constructors
Properties
A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP. This is not stored in the state file. See cidr_authorization_context for more information.
The ID of the pool to which you want to assign a CIDR.
If provided, the cidr provisioned into the specified pool will be the next available cidr given this declared netmask length. Conflicts with cidr
.