VpcIpamPool class

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:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.getRegion({});
const example = new aws.ec2.VpcIpam("example", {operatingRegions: [{
    regionName: current.then(current => current.region),
}]});
const exampleVpcIpamPool = new aws.ec2.VpcIpamPool("example", {
    addressFamily: "ipv4",
    ipamScopeId: example.privateDefaultScopeId,
    locale: current.then(current => current.region),
});
import pulumi
import pulumi_aws as aws

current = aws.get_region()
example = aws.ec2.VpcIpam("example", operating_regions=[{
    "region_name": current.region,
}])
example_vpc_ipam_pool = aws.ec2.VpcIpamPool("example",
    address_family="ipv4",
    ipam_scope_id=example.private_default_scope_id,
    locale=current.region)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var current = Aws.GetRegion.Invoke();

    var example = new Aws.Ec2.VpcIpam("example", new()
    {
        OperatingRegions = new[]
        {
            new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
            {
                RegionName = current.Apply(getRegionResult => getRegionResult.Region),
            },
        },
    });

    var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool("example", new()
    {
        AddressFamily = "ipv4",
        IpamScopeId = example.PrivateDefaultScopeId,
        Locale = current.Apply(getRegionResult => getRegionResult.Region),
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
		if err != nil {
			return err
		}
		example, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
			OperatingRegions: ec2.VpcIpamOperatingRegionArray{
				&ec2.VpcIpamOperatingRegionArgs{
					RegionName: pulumi.String(current.Region),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcIpamPool(ctx, "example", &ec2.VpcIpamPoolArgs{
			AddressFamily: pulumi.String("ipv4"),
			IpamScopeId:   example.PrivateDefaultScopeId,
			Locale:        pulumi.String(current.Region),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_getregion" "current" {
}

resource "aws_ec2_vpcipam" "example" {
  operating_regions {
    region_name = data.aws_getregion.current.region
  }
}
resource "aws_ec2_vpcipampool" "example" {
  address_family = "ipv4"
  ipam_scope_id  = aws_ec2_vpcipam.example.private_default_scope_id
  locale         = data.aws_getregion.current.region
}
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());

    }
}
resources:
  example:
    type: aws:ec2:VpcIpam
    properties:
      operatingRegions:
        - regionName: ${current.region}
  exampleVpcIpamPool:
    type: aws:ec2:VpcIpamPool
    name: example
    properties:
      addressFamily: ipv4
      ipamScopeId: ${example.privateDefaultScopeId}
      locale: ${current.region}
variables:
  current:
    fn::invoke:
      function: aws:getRegion
      arguments: {}

Nested Pools:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.getRegion({});
const example = new aws.ec2.VpcIpam("example", {operatingRegions: [{
    regionName: current.then(current => current.region),
}]});
const parent = new aws.ec2.VpcIpamPool("parent", {
    addressFamily: "ipv4",
    ipamScopeId: example.privateDefaultScopeId,
});
const parentTest = new aws.ec2.VpcIpamPoolCidr("parent_test", {
    ipamPoolId: parent.id,
    cidr: "172.20.0.0/16",
});
const child = new aws.ec2.VpcIpamPool("child", {
    addressFamily: "ipv4",
    ipamScopeId: example.privateDefaultScopeId,
    locale: current.then(current => current.region),
    sourceIpamPoolId: parent.id,
});
const childTest = new aws.ec2.VpcIpamPoolCidr("child_test", {
    ipamPoolId: child.id,
    cidr: "172.20.0.0/24",
});
import pulumi
import pulumi_aws as aws

current = aws.get_region()
example = aws.ec2.VpcIpam("example", operating_regions=[{
    "region_name": current.region,
}])
parent = aws.ec2.VpcIpamPool("parent",
    address_family="ipv4",
    ipam_scope_id=example.private_default_scope_id)
parent_test = aws.ec2.VpcIpamPoolCidr("parent_test",
    ipam_pool_id=parent.id,
    cidr="172.20.0.0/16")
child = aws.ec2.VpcIpamPool("child",
    address_family="ipv4",
    ipam_scope_id=example.private_default_scope_id,
    locale=current.region,
    source_ipam_pool_id=parent.id)
child_test = aws.ec2.VpcIpamPoolCidr("child_test",
    ipam_pool_id=child.id,
    cidr="172.20.0.0/24")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var current = Aws.GetRegion.Invoke();

    var example = new Aws.Ec2.VpcIpam("example", new()
    {
        OperatingRegions = new[]
        {
            new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
            {
                RegionName = current.Apply(getRegionResult => getRegionResult.Region),
            },
        },
    });

    var parent = new Aws.Ec2.VpcIpamPool("parent", new()
    {
        AddressFamily = "ipv4",
        IpamScopeId = example.PrivateDefaultScopeId,
    });

    var parentTest = new Aws.Ec2.VpcIpamPoolCidr("parent_test", new()
    {
        IpamPoolId = parent.Id,
        Cidr = "172.20.0.0/16",
    });

    var child = new Aws.Ec2.VpcIpamPool("child", new()
    {
        AddressFamily = "ipv4",
        IpamScopeId = example.PrivateDefaultScopeId,
        Locale = current.Apply(getRegionResult => getRegionResult.Region),
        SourceIpamPoolId = parent.Id,
    });

    var childTest = new Aws.Ec2.VpcIpamPoolCidr("child_test", new()
    {
        IpamPoolId = child.Id,
        Cidr = "172.20.0.0/24",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
		if err != nil {
			return err
		}
		example, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
			OperatingRegions: ec2.VpcIpamOperatingRegionArray{
				&ec2.VpcIpamOperatingRegionArgs{
					RegionName: pulumi.String(current.Region),
				},
			},
		})
		if err != nil {
			return err
		}
		parent, err := ec2.NewVpcIpamPool(ctx, "parent", &ec2.VpcIpamPoolArgs{
			AddressFamily: pulumi.String("ipv4"),
			IpamScopeId:   example.PrivateDefaultScopeId,
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcIpamPoolCidr(ctx, "parent_test", &ec2.VpcIpamPoolCidrArgs{
			IpamPoolId: parent.ID().ToIDOutput().ToStringOutput(),
			Cidr:       pulumi.String("172.20.0.0/16"),
		})
		if err != nil {
			return err
		}
		child, err := ec2.NewVpcIpamPool(ctx, "child", &ec2.VpcIpamPoolArgs{
			AddressFamily:    pulumi.String("ipv4"),
			IpamScopeId:      example.PrivateDefaultScopeId,
			Locale:           pulumi.String(current.Region),
			SourceIpamPoolId: parent.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcIpamPoolCidr(ctx, "child_test", &ec2.VpcIpamPoolCidrArgs{
			IpamPoolId: child.ID().ToIDOutput().ToStringOutput(),
			Cidr:       pulumi.String("172.20.0.0/24"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_getregion" "current" {
}

resource "aws_ec2_vpcipam" "example" {
  operating_regions {
    region_name = data.aws_getregion.current.region
  }
}
resource "aws_ec2_vpcipampool" "parent" {
  address_family = "ipv4"
  ipam_scope_id  = aws_ec2_vpcipam.example.private_default_scope_id
}
resource "aws_ec2_vpcipampoolcidr" "parent_test" {
  ipam_pool_id = aws_ec2_vpcipampool.parent.id
  cidr         = "172.20.0.0/16"
}
resource "aws_ec2_vpcipampool" "child" {
  address_family      = "ipv4"
  ipam_scope_id       = aws_ec2_vpcipam.example.private_default_scope_id
  locale              = data.aws_getregion.current.region
  source_ipam_pool_id = aws_ec2_vpcipampool.parent.id
}
resource "aws_ec2_vpcipampoolcidr" "child_test" {
  ipam_pool_id = aws_ec2_vpcipampool.child.id
  cidr         = "172.20.0.0/24"
}
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());

    }
}
resources:
  example:
    type: aws:ec2:VpcIpam
    properties:
      operatingRegions:
        - regionName: ${current.region}
  parent:
    type: aws:ec2:VpcIpamPool
    properties:
      addressFamily: ipv4
      ipamScopeId: ${example.privateDefaultScopeId}
  parentTest:
    type: aws:ec2:VpcIpamPoolCidr
    name: parent_test
    properties:
      ipamPoolId: ${parent.id}
      cidr: 172.20.0.0/16
  child:
    type: aws:ec2:VpcIpamPool
    properties:
      addressFamily: ipv4
      ipamScopeId: ${example.privateDefaultScopeId}
      locale: ${current.region}
      sourceIpamPoolId: ${parent.id}
  childTest:
    type: aws:ec2:VpcIpamPoolCidr
    name: child_test
    properties:
      ipamPoolId: ${child.id}
      cidr: 172.20.0.0/24
variables:
  current:
    fn::invoke:
      function: aws:getRegion
      arguments: {}

Resource Planning Pools:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.getRegion({});
const example = new aws.ec2.VpcIpam("example", {operatingRegions: [{
    regionName: current.then(current => current.region),
}]});
const test = new aws.ec2.VpcIpamPool("test", {
    addressFamily: "ipv4",
    ipamScopeId: example.privateDefaultScopeId,
});
const testVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr("test", {
    ipamPoolId: parent.id,
    cidr: "10.0.0.0/16",
});
const testVpc = new aws.ec2.Vpc("test", {
    ipv4IpamPoolId: test.id,
    ipv4NetmaskLength: 24,
}, {
    dependsOn: [testVpcIpamPoolCidr],
});
const vpc = new aws.ec2.VpcIpamPool("vpc", {
    sourceResource: {
        resourceId: testVpc.id,
        resourceOwner: currentAwsCallerIdentity.accountId,
        resourceRegion: current.then(current => current.region),
        resourceType: "vpc",
    },
    addressFamily: "ipv4",
    ipamScopeId: testAwsVpcIpam.privateDefaultScopeId,
    locale: current.then(current => current.region),
    sourceIpamPoolId: test.id,
});
import pulumi
import pulumi_aws as aws

current = aws.get_region()
example = aws.ec2.VpcIpam("example", operating_regions=[{
    "region_name": current.region,
}])
test = aws.ec2.VpcIpamPool("test",
    address_family="ipv4",
    ipam_scope_id=example.private_default_scope_id)
test_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr("test",
    ipam_pool_id=parent["id"],
    cidr="10.0.0.0/16")
test_vpc = aws.ec2.Vpc("test",
    ipv4_ipam_pool_id=test.id,
    ipv4_netmask_length=24,
    opts = pulumi.ResourceOptions(depends_on=[test_vpc_ipam_pool_cidr]))
vpc = aws.ec2.VpcIpamPool("vpc",
    source_resource={
        "resource_id": test_vpc.id,
        "resource_owner": current_aws_caller_identity["accountId"],
        "resource_region": current.region,
        "resource_type": "vpc",
    },
    address_family="ipv4",
    ipam_scope_id=test_aws_vpc_ipam["privateDefaultScopeId"],
    locale=current.region,
    source_ipam_pool_id=test.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var current = Aws.GetRegion.Invoke();

    var example = new Aws.Ec2.VpcIpam("example", new()
    {
        OperatingRegions = new[]
        {
            new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
            {
                RegionName = current.Apply(getRegionResult => getRegionResult.Region),
            },
        },
    });

    var test = new Aws.Ec2.VpcIpamPool("test", new()
    {
        AddressFamily = "ipv4",
        IpamScopeId = example.PrivateDefaultScopeId,
    });

    var testVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr("test", new()
    {
        IpamPoolId = parent.Id,
        Cidr = "10.0.0.0/16",
    });

    var testVpc = new Aws.Ec2.Vpc("test", new()
    {
        Ipv4IpamPoolId = test.Id,
        Ipv4NetmaskLength = 24,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            testVpcIpamPoolCidr,
        },
    });

    var vpc = new Aws.Ec2.VpcIpamPool("vpc", new()
    {
        SourceResource = new Aws.Ec2.Inputs.VpcIpamPoolSourceResourceArgs
        {
            ResourceId = testVpc.Id,
            ResourceOwner = currentAwsCallerIdentity.AccountId,
            ResourceRegion = current.Apply(getRegionResult => getRegionResult.Region),
            ResourceType = "vpc",
        },
        AddressFamily = "ipv4",
        IpamScopeId = testAwsVpcIpam.PrivateDefaultScopeId,
        Locale = current.Apply(getRegionResult => getRegionResult.Region),
        SourceIpamPoolId = test.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
		if err != nil {
			return err
		}
		example, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
			OperatingRegions: ec2.VpcIpamOperatingRegionArray{
				&ec2.VpcIpamOperatingRegionArgs{
					RegionName: pulumi.String(current.Region),
				},
			},
		})
		if err != nil {
			return err
		}
		test, err := ec2.NewVpcIpamPool(ctx, "test", &ec2.VpcIpamPoolArgs{
			AddressFamily: pulumi.String("ipv4"),
			IpamScopeId:   example.PrivateDefaultScopeId,
		})
		if err != nil {
			return err
		}
		testVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, "test", &ec2.VpcIpamPoolCidrArgs{
			IpamPoolId: pulumi.Any(parent.Id),
			Cidr:       pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		testVpc, err := ec2.NewVpc(ctx, "test", &ec2.VpcArgs{
			Ipv4IpamPoolId:    test.ID().ToIDOutput().ToStringOutput(),
			Ipv4NetmaskLength: pulumi.Int(24),
		}, pulumi.DependsOn([]pulumi.Resource{
			testVpcIpamPoolCidr,
		}))
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcIpamPool(ctx, "vpc", &ec2.VpcIpamPoolArgs{
			SourceResource: &ec2.VpcIpamPoolSourceResourceArgs{
				ResourceId:     testVpc.ID().ToIDOutput().ToStringOutput(),
				ResourceOwner:  pulumi.Any(currentAwsCallerIdentity.AccountId),
				ResourceRegion: pulumi.String(current.Region),
				ResourceType:   pulumi.String("vpc"),
			},
			AddressFamily:    pulumi.String("ipv4"),
			IpamScopeId:      pulumi.Any(testAwsVpcIpam.PrivateDefaultScopeId),
			Locale:           pulumi.String(current.Region),
			SourceIpamPoolId: test.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_getregion" "current" {
}

resource "aws_ec2_vpcipam" "example" {
  operating_regions {
    region_name = data.aws_getregion.current.region
  }
}
resource "aws_ec2_vpcipampool" "test" {
  address_family = "ipv4"
  ipam_scope_id  = aws_ec2_vpcipam.example.private_default_scope_id
}
resource "aws_ec2_vpcipampoolcidr" "test" {
  ipam_pool_id = parent.id
  cidr         = "10.0.0.0/16"
}
resource "aws_ec2_vpc" "test" {
  depends_on          = [aws_ec2_vpcipampoolcidr.test]
  ipv4_ipam_pool_id   = aws_ec2_vpcipampool.test.id
  ipv4_netmask_length = 24
}
resource "aws_ec2_vpcipampool" "vpc" {
  source_resource = {
    resource_id     = aws_ec2_vpc.test.id
    resource_owner  = currentAwsCallerIdentity.accountId
    resource_region = data.aws_getregion.current.region
    resource_type   = "vpc"
  }
  address_family      = "ipv4"
  ipam_scope_id       = testAwsVpcIpam.privateDefaultScopeId
  locale              = data.aws_getregion.current.region
  source_ipam_pool_id = aws_ec2_vpcipampool.test.id
}
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());

    }
}
resources:
  example:
    type: aws:ec2:VpcIpam
    properties:
      operatingRegions:
        - regionName: ${current.region}
  test:
    type: aws:ec2:VpcIpamPool
    properties:
      addressFamily: ipv4
      ipamScopeId: ${example.privateDefaultScopeId}
  testVpcIpamPoolCidr:
    type: aws:ec2:VpcIpamPoolCidr
    name: test
    properties:
      ipamPoolId: ${parent.id}
      cidr: 10.0.0.0/16
  testVpc:
    type: aws:ec2:Vpc
    name: test
    properties:
      ipv4IpamPoolId: ${test.id}
      ipv4NetmaskLength: 24
    options:
      dependsOn:
        - ${testVpcIpamPoolCidr}
  vpc:
    type: aws:ec2:VpcIpamPool
    properties:
      sourceResource:
        resourceId: ${testVpc.id}
        resourceOwner: ${currentAwsCallerIdentity.accountId}
        resourceRegion: ${current.region}
        resourceType: vpc
      addressFamily: ipv4
      ipamScopeId: ${testAwsVpcIpam.privateDefaultScopeId}
      locale: ${current.region}
      sourceIpamPoolId: ${test.id}
variables:
  current:
    fn::invoke:
      function: aws:getRegion
      arguments: {}

Import

Using pulumi import, import IPAMs using the IPAM pool id. For example:

$ pulumi import aws:ec2/vpcIpamPool:VpcIpamPool example ipam-pool-0958f95207d978e1e

Constructors

VpcIpamPool(String name, {VpcIpamPoolArgs? args, CustomResourceOptions? options})
Creates a new VpcIpamPool. name The Pulumi resource name. args Arguments used to configure this VpcIpamPool. The set of arguments for VpcIpamPool. options Resource options controlling this resource's behavior.
VpcIpamPool.reference(String urn)
Creates a typed reference to an existing VpcIpamPool resource.

Properties

addressFamily ↔ Output<String>
The IP protocol assigned to this pool. You must choose either IPv4 or IPv6 protocol for a pool.
latefinal
allocationDefaultNetmaskLength ↔ Output<int?>
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).
latefinal
allocationMaxNetmaskLength ↔ Output<int?>
The maximum netmask length that will be required for CIDR allocations in this pool.
latefinal
allocationMinNetmaskLength ↔ Output<int?>
The minimum netmask length that will be required for CIDR allocations in this pool.
latefinal
allocationResourceTags ↔ Output<Map<String, String>?>
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.
latefinal
arn ↔ Output<String>
ARN of IPAM
latefinal
autoImport ↔ Output<bool?>
If you include this argument, IPAM automatically imports any VPCs you have in your scope that fall within the CIDR range in the pool.
latefinal
awsService ↔ Output<String?>
Limits which AWS service the pool can be used in. Only useable on public scopes. Valid Values: ec2.
latefinal
cascade ↔ Output<bool?>
Enables you to quickly delete an IPAM pool and all resources within that pool, including provisioned CIDRs, allocations, and other pools.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
description ↔ Output<String?>
A description for the IPAM pool.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
ipamScopeId ↔ Output<String>
The ID of the scope in which you would like to create the IPAM pool.
latefinal
ipamScopeType ↔ Output<String>
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
locale ↔ Output<String?>
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.
latefinal
poolDepth ↔ Output<int>
latefinal
publicIpSource ↔ Output<String?>
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.
latefinal
publiclyAdvertisable ↔ Output<bool?>
Defines whether or not 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.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceIpamPoolId ↔ Output<String?>
The ID of the source IPAM pool. Use this argument to create a child pool within an existing pool.
latefinal
sourceResource ↔ Output<VpcIpamPoolSourceResource?>
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.
latefinal
state ↔ Output<String>
The ID of the IPAM
latefinal
tags ↔ Output<Map<String, String>?>
A 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.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {VpcIpamPoolState? state, CustomResourceOptions? options}) → VpcIpamPool
Gets an existing VpcIpamPool resource's state with the given name and id.