Class VpcIpamPool


  • public class VpcIpamPool
    extends com.pulumi.resources.CustomResource
    Provides an IP address pool resource for IPAM. > **NOTE:** When provisioning resource planning IPAM pools, it can take upto 30 minutes for the CIDR to be managed by IPAM. ## 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 java.util.ArrayList;
     import java.util.Arrays;
     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(GetRegionArgs.builder()
                 .build());
     
             var example = new VpcIpam("example", VpcIpamArgs.builder()
                 .operatingRegions(VpcIpamOperatingRegionArgs.builder()
                     .regionName(current.region())
                     .build())
                 .build());
     
             var exampleVpcIpamPool = new VpcIpamPool("exampleVpcIpamPool", VpcIpamPoolArgs.builder()
                 .addressFamily("ipv4")
                 .ipamScopeId(example.privateDefaultScopeId())
                 .locale(current.region())
                 .build());
     
         }
     }
     
     
    Nested Pools:
     
     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.ArrayList;
     import java.util.Arrays;
     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(GetRegionArgs.builder()
                 .build());
     
             var example = new VpcIpam("example", VpcIpamArgs.builder()
                 .operatingRegions(VpcIpamOperatingRegionArgs.builder()
                     .regionName(current.region())
                     .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.region())
                 .sourceIpamPoolId(parent.id())
                 .build());
     
             var childTest = new VpcIpamPoolCidr("childTest", VpcIpamPoolCidrArgs.builder()
                 .ipamPoolId(child.id())
                 .cidr("172.20.0.0/24")
                 .build());
     
         }
     }
     
     
    Resource Planning Pools:
     
     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 com.pulumi.aws.ec2.Vpc;
     import com.pulumi.aws.ec2.VpcArgs;
     import com.pulumi.aws.ec2.inputs.VpcIpamPoolSourceResourceArgs;
     import com.pulumi.resources.CustomResourceOptions;
     import java.util.ArrayList;
     import java.util.Arrays;
     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(GetRegionArgs.builder()
                 .build());
     
             var example = new VpcIpam("example", VpcIpamArgs.builder()
                 .operatingRegions(VpcIpamOperatingRegionArgs.builder()
                     .regionName(current.region())
                     .build())
                 .build());
     
             var test = new VpcIpamPool("test", VpcIpamPoolArgs.builder()
                 .addressFamily("ipv4")
                 .ipamScopeId(example.privateDefaultScopeId())
                 .build());
     
             var testVpcIpamPoolCidr = new VpcIpamPoolCidr("testVpcIpamPoolCidr", VpcIpamPoolCidrArgs.builder()
                 .ipamPoolId(parent.id())
                 .cidr("10.0.0.0/16")
                 .build());
     
             var testVpc = new Vpc("testVpc", VpcArgs.builder()
                 .ipv4IpamPoolId(test.id())
                 .ipv4NetmaskLength(24)
                 .build(), CustomResourceOptions.builder()
                     .dependsOn(testVpcIpamPoolCidr)
                     .build());
     
             var vpc = new VpcIpamPool("vpc", VpcIpamPoolArgs.builder()
                 .sourceResource(VpcIpamPoolSourceResourceArgs.builder()
                     .resourceId(testVpc.id())
                     .resourceOwner(currentAwsCallerIdentity.accountId())
                     .resourceRegion(current.region())
                     .resourceType("vpc")
                     .build())
                 .addressFamily("ipv4")
                 .ipamScopeId(testAwsVpcIpam.privateDefaultScopeId())
                 .locale(current.region())
                 .sourceIpamPoolId(test.id())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import IPAMs using the IPAM pool `id`. For example: ```sh $ pulumi import aws:ec2/vpcIpamPool:VpcIpamPool example ipam-pool-0958f95207d978e1e ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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.Boolean>> cascade()  
      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.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceIpamPoolId()  
      com.pulumi.core.Output<java.util.Optional<VpcIpamPoolSourceResource>> sourceResource()  
      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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        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:
        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:
        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:
        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:
        ARN of IPAM
      • autoImport

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> autoImport()
        Returns:
        Whether to automatically import 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`.
      • cascade

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> cascade()
        Returns:
        Whether to quickly delete an IPAM pool and all resources within that pool, including provisioned CIDRs, allocations, and other pools.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description for the IPAM pool.
      • ipamScopeId

        public com.pulumi.core.Output<java.lang.String> ipamScopeId()
        Returns:
        ID of the scope in which you would like to create the IPAM pool.
      • ipamScopeType

        public com.pulumi.core.Output<java.lang.String> ipamScopeType()
        Returns:
        Type of the scope the pool belongs to.
      • locale

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> locale()
        Returns:
        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()
        Returns:
        Depth of pools in your IPAM pool.
      • publicIpSource

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> publicIpSource()
        Returns:
        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:
        Whether IPv6 pool space is publicly advertisable over the internet. This argument is required if `addressFamily = "ipv6"` and `publicIpSource = "byoip"`, default is `false`. This option is not available for IPv4 pool space or if `publicIpSource = "amazon"`. Setting this argument to `true` when it is not available may result in erroneous differences being reported.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • sourceIpamPoolId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceIpamPoolId()
        Returns:
        ID of the source IPAM pool. Use this argument to create a child pool within an existing pool.
      • sourceResource

        public com.pulumi.core.Output<java.util.Optional<VpcIpamPoolSourceResource>> sourceResource()
        Returns:
        Resource to use to use to configure a resource planning IPAM Pool. If configured, the `locale` of the parent pool must match the region that the VPC resides in.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        State of the IPAM pool.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the resource. If configured with a provider `defaultTags` 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:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` 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.