Package com.pulumi.aws.ec2
Class VpcIpamPool
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.VpcIpamPool
-
public class VpcIpamPool extends com.pulumi.resources.CustomResource
Provides an IP address pool resource for IPAM. ## Example Usage Basic usage: <!--Start PulumiCodeChooser --> ```java 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 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 example = new VpcIpam("example", VpcIpamArgs.builder() .operatingRegions(VpcIpamOperatingRegionArgs.builder() .regionName(current.applyValue(getRegionResult -> getRegionResult.name())) .build()) .build()); var exampleVpcIpamPool = new VpcIpamPool("exampleVpcIpamPool", VpcIpamPoolArgs.builder() .addressFamily("ipv4") .ipamScopeId(example.privateDefaultScopeId()) .locale(current.applyValue(getRegionResult -> getRegionResult.name())) .build()); } } ``` <!--End PulumiCodeChooser --> Nested Pools: <!--Start PulumiCodeChooser --> ```java 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 example = new VpcIpam("example", VpcIpamArgs.builder() .operatingRegions(VpcIpamOperatingRegionArgs.builder() .regionName(current.applyValue(getRegionResult -> getRegionResult.name())) .build()) .build()); var parent = new VpcIpamPool("parent", VpcIpamPoolArgs.builder() .addressFamily("ipv4") .ipamScopeId(example.privateDefaultScopeId()) .build()); var parentTest = new VpcIpamPoolCidr("parentTest", VpcIpamPoolCidrArgs.builder() .ipamPoolId(parent.id()) .cidr("172.20.0.0/16") .build()); var child = new VpcIpamPool("child", VpcIpamPoolArgs.builder() .addressFamily("ipv4") .ipamScopeId(example.privateDefaultScopeId()) .locale(current.applyValue(getRegionResult -> getRegionResult.name())) .sourceIpamPoolId(parent.id()) .build()); var childTest = new VpcIpamPoolCidr("childTest", VpcIpamPoolCidrArgs.builder() .ipamPoolId(child.id()) .cidr("172.20.0.0/24") .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import IPAMs using the IPAM pool `id`. For example: ```sh $ pulumi import aws:ec2/vpcIpamPool:VpcIpamPool example ipam-pool-0958f95207d978e1e ```
-
-
Constructor Summary
Constructors Constructor Description VpcIpamPool(java.lang.String name)
VpcIpamPool(java.lang.String name, VpcIpamPoolArgs args)
VpcIpamPool(java.lang.String name, VpcIpamPoolArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
addressFamily()
com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
allocationDefaultNetmaskLength()
com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
allocationMaxNetmaskLength()
com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
allocationMinNetmaskLength()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
allocationResourceTags()
com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
autoImport()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
awsService()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
description()
static VpcIpamPool
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VpcIpamPoolState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
ipamScopeId()
com.pulumi.core.Output<java.lang.String>
ipamScopeType()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
locale()
com.pulumi.core.Output<java.lang.Integer>
poolDepth()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
publicIpSource()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
publiclyAdvertisable()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
sourceIpamPoolId()
com.pulumi.core.Output<java.lang.String>
state()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
-
-
-
Constructor Detail
-
VpcIpamPool
public VpcIpamPool(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
VpcIpamPool
public VpcIpamPool(java.lang.String name, VpcIpamPoolArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
VpcIpamPool
public VpcIpamPool(java.lang.String name, VpcIpamPoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
addressFamily
public com.pulumi.core.Output<java.lang.String> addressFamily()
- Returns:
- The IP protocol assigned to this pool. You must choose either IPv4 or IPv6 protocol for a pool.
-
allocationDefaultNetmaskLength
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> allocationDefaultNetmaskLength()
- Returns:
- A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16 (unless you provide a different netmask value when you create the new allocation).
-
allocationMaxNetmaskLength
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> allocationMaxNetmaskLength()
- Returns:
- The maximum netmask length that will be required for CIDR allocations in this pool.
-
allocationMinNetmaskLength
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> allocationMinNetmaskLength()
- Returns:
- The minimum netmask length that will be required for CIDR allocations in this pool.
-
allocationResourceTags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> allocationResourceTags()
- Returns:
- Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- Amazon Resource Name (ARN) of IPAM
-
autoImport
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> autoImport()
- Returns:
- If you include this argument, IPAM automatically imports any VPCs you have in your scope that fall within the CIDR range in the pool.
-
awsService
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> awsService()
- Returns:
- Limits which AWS service the pool can be used in. Only useable on public scopes. Valid Values: `ec2`.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description for the IPAM pool.
-
ipamScopeId
public com.pulumi.core.Output<java.lang.String> ipamScopeId()
- Returns:
- The ID of the scope in which you would like to create the IPAM pool.
-
ipamScopeType
public com.pulumi.core.Output<java.lang.String> ipamScopeType()
-
locale
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> locale()
- Returns:
- The locale in which you would like to create the IPAM pool. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. Possible values: Any AWS region, such as `us-east-1`.
-
poolDepth
public com.pulumi.core.Output<java.lang.Integer> poolDepth()
-
publicIpSource
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> publicIpSource()
- Returns:
- The IP address source for pools in the public scope. Only used for provisioning IP address CIDRs to pools in the public scope. Valid values are `byoip` or `amazon`. Default is `byoip`.
-
publiclyAdvertisable
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> publiclyAdvertisable()
- Returns:
- Defines whether or not IPv6 pool space is publicly advertisable over the internet. This argument is required if `address_family = "ipv6"` and `public_ip_source = "byoip"`, default is `false`. This option is not available for IPv4 pool space or if `public_ip_source = "amazon"`.
-
sourceIpamPoolId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceIpamPoolId()
- Returns:
- The ID of the source IPAM pool. Use this argument to create a child pool within an existing pool.
-
state
public com.pulumi.core.Output<java.lang.String> state()
- Returns:
- The ID of the IPAM
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
-
get
public static VpcIpamPool get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VpcIpamPoolState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-