1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. VpcIpamPoolCidrAllocation
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.ec2.VpcIpamPoolCidrAllocation

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Allocates (reserves) a CIDR from an IPAM address pool, preventing usage by IPAM. Only works for private IPv4.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.getRegion({});
    const exampleVpcIpam = new aws.ec2.VpcIpam("example", {operatingRegions: [{
        regionName: current.then(current => current.name),
    }]});
    const exampleVpcIpamPool = new aws.ec2.VpcIpamPool("example", {
        addressFamily: "ipv4",
        ipamScopeId: exampleVpcIpam.privateDefaultScopeId,
        locale: current.then(current => current.name),
    });
    const exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr("example", {
        ipamPoolId: exampleVpcIpamPool.id,
        cidr: "172.20.0.0/16",
    });
    const example = new aws.ec2.VpcIpamPoolCidrAllocation("example", {
        ipamPoolId: exampleVpcIpamPool.id,
        cidr: "172.20.0.0/24",
    }, {
        dependsOn: [exampleVpcIpamPoolCidr],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_region()
    example_vpc_ipam = aws.ec2.VpcIpam("example", operating_regions=[{
        "region_name": current.name,
    }])
    example_vpc_ipam_pool = aws.ec2.VpcIpamPool("example",
        address_family="ipv4",
        ipam_scope_id=example_vpc_ipam.private_default_scope_id,
        locale=current.name)
    example_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr("example",
        ipam_pool_id=example_vpc_ipam_pool.id,
        cidr="172.20.0.0/16")
    example = aws.ec2.VpcIpamPoolCidrAllocation("example",
        ipam_pool_id=example_vpc_ipam_pool.id,
        cidr="172.20.0.0/24",
        opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/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, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleVpcIpam, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
    			OperatingRegions: ec2.VpcIpamOperatingRegionArray{
    				&ec2.VpcIpamOperatingRegionArgs{
    					RegionName: pulumi.String(current.Name),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, "example", &ec2.VpcIpamPoolArgs{
    			AddressFamily: pulumi.String("ipv4"),
    			IpamScopeId:   exampleVpcIpam.PrivateDefaultScopeId,
    			Locale:        pulumi.String(current.Name),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, "example", &ec2.VpcIpamPoolCidrArgs{
    			IpamPoolId: exampleVpcIpamPool.ID(),
    			Cidr:       pulumi.String("172.20.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewVpcIpamPoolCidrAllocation(ctx, "example", &ec2.VpcIpamPoolCidrAllocationArgs{
    			IpamPoolId: exampleVpcIpamPool.ID(),
    			Cidr:       pulumi.String("172.20.0.0/24"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleVpcIpamPoolCidr,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Aws.GetRegion.Invoke();
    
        var exampleVpcIpam = new Aws.Ec2.VpcIpam("example", new()
        {
            OperatingRegions = new[]
            {
                new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
                {
                    RegionName = current.Apply(getRegionResult => getRegionResult.Name),
                },
            },
        });
    
        var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool("example", new()
        {
            AddressFamily = "ipv4",
            IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,
            Locale = current.Apply(getRegionResult => getRegionResult.Name),
        });
    
        var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr("example", new()
        {
            IpamPoolId = exampleVpcIpamPool.Id,
            Cidr = "172.20.0.0/16",
        });
    
        var example = new Aws.Ec2.VpcIpamPoolCidrAllocation("example", new()
        {
            IpamPoolId = exampleVpcIpamPool.Id,
            Cidr = "172.20.0.0/24",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                exampleVpcIpamPoolCidr,
            },
        });
    
    });
    
    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.VpcIpamPoolCidrAllocation;
    import com.pulumi.aws.ec2.VpcIpamPoolCidrAllocationArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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.20.0.0/16")
                .build());
    
            var example = new VpcIpamPoolCidrAllocation("example", VpcIpamPoolCidrAllocationArgs.builder()
                .ipamPoolId(exampleVpcIpamPool.id())
                .cidr("172.20.0.0/24")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleVpcIpamPoolCidr)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:VpcIpamPoolCidrAllocation
        properties:
          ipamPoolId: ${exampleVpcIpamPool.id}
          cidr: 172.20.0.0/24
        options:
          dependson:
            - ${exampleVpcIpamPoolCidr}
      exampleVpcIpamPoolCidr:
        type: aws:ec2:VpcIpamPoolCidr
        name: example
        properties:
          ipamPoolId: ${exampleVpcIpamPool.id}
          cidr: 172.20.0.0/16
      exampleVpcIpamPool:
        type: aws:ec2:VpcIpamPool
        name: example
        properties:
          addressFamily: ipv4
          ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}
          locale: ${current.name}
      exampleVpcIpam:
        type: aws:ec2:VpcIpam
        name: example
        properties:
          operatingRegions:
            - regionName: ${current.name}
    variables:
      current:
        fn::invoke:
          Function: aws:getRegion
          Arguments: {}
    

    With the disallowed_cidrs attribute:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.getRegion({});
    const exampleVpcIpam = new aws.ec2.VpcIpam("example", {operatingRegions: [{
        regionName: current.then(current => current.name),
    }]});
    const exampleVpcIpamPool = new aws.ec2.VpcIpamPool("example", {
        addressFamily: "ipv4",
        ipamScopeId: exampleVpcIpam.privateDefaultScopeId,
        locale: current.then(current => current.name),
    });
    const exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr("example", {
        ipamPoolId: exampleVpcIpamPool.id,
        cidr: "172.20.0.0/16",
    });
    const example = new aws.ec2.VpcIpamPoolCidrAllocation("example", {
        ipamPoolId: exampleVpcIpamPool.id,
        netmaskLength: 28,
        disallowedCidrs: ["172.20.0.0/28"],
    }, {
        dependsOn: [exampleVpcIpamPoolCidr],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_region()
    example_vpc_ipam = aws.ec2.VpcIpam("example", operating_regions=[{
        "region_name": current.name,
    }])
    example_vpc_ipam_pool = aws.ec2.VpcIpamPool("example",
        address_family="ipv4",
        ipam_scope_id=example_vpc_ipam.private_default_scope_id,
        locale=current.name)
    example_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr("example",
        ipam_pool_id=example_vpc_ipam_pool.id,
        cidr="172.20.0.0/16")
    example = aws.ec2.VpcIpamPoolCidrAllocation("example",
        ipam_pool_id=example_vpc_ipam_pool.id,
        netmask_length=28,
        disallowed_cidrs=["172.20.0.0/28"],
        opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/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, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleVpcIpam, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
    			OperatingRegions: ec2.VpcIpamOperatingRegionArray{
    				&ec2.VpcIpamOperatingRegionArgs{
    					RegionName: pulumi.String(current.Name),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, "example", &ec2.VpcIpamPoolArgs{
    			AddressFamily: pulumi.String("ipv4"),
    			IpamScopeId:   exampleVpcIpam.PrivateDefaultScopeId,
    			Locale:        pulumi.String(current.Name),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, "example", &ec2.VpcIpamPoolCidrArgs{
    			IpamPoolId: exampleVpcIpamPool.ID(),
    			Cidr:       pulumi.String("172.20.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewVpcIpamPoolCidrAllocation(ctx, "example", &ec2.VpcIpamPoolCidrAllocationArgs{
    			IpamPoolId:    exampleVpcIpamPool.ID(),
    			NetmaskLength: pulumi.Int(28),
    			DisallowedCidrs: pulumi.StringArray{
    				pulumi.String("172.20.0.0/28"),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleVpcIpamPoolCidr,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Aws.GetRegion.Invoke();
    
        var exampleVpcIpam = new Aws.Ec2.VpcIpam("example", new()
        {
            OperatingRegions = new[]
            {
                new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
                {
                    RegionName = current.Apply(getRegionResult => getRegionResult.Name),
                },
            },
        });
    
        var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool("example", new()
        {
            AddressFamily = "ipv4",
            IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,
            Locale = current.Apply(getRegionResult => getRegionResult.Name),
        });
    
        var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr("example", new()
        {
            IpamPoolId = exampleVpcIpamPool.Id,
            Cidr = "172.20.0.0/16",
        });
    
        var example = new Aws.Ec2.VpcIpamPoolCidrAllocation("example", new()
        {
            IpamPoolId = exampleVpcIpamPool.Id,
            NetmaskLength = 28,
            DisallowedCidrs = new[]
            {
                "172.20.0.0/28",
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                exampleVpcIpamPoolCidr,
            },
        });
    
    });
    
    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.VpcIpamPoolCidrAllocation;
    import com.pulumi.aws.ec2.VpcIpamPoolCidrAllocationArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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.20.0.0/16")
                .build());
    
            var example = new VpcIpamPoolCidrAllocation("example", VpcIpamPoolCidrAllocationArgs.builder()
                .ipamPoolId(exampleVpcIpamPool.id())
                .netmaskLength(28)
                .disallowedCidrs("172.20.0.0/28")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleVpcIpamPoolCidr)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:VpcIpamPoolCidrAllocation
        properties:
          ipamPoolId: ${exampleVpcIpamPool.id}
          netmaskLength: 28
          disallowedCidrs:
            - 172.20.0.0/28
        options:
          dependson:
            - ${exampleVpcIpamPoolCidr}
      exampleVpcIpamPoolCidr:
        type: aws:ec2:VpcIpamPoolCidr
        name: example
        properties:
          ipamPoolId: ${exampleVpcIpamPool.id}
          cidr: 172.20.0.0/16
      exampleVpcIpamPool:
        type: aws:ec2:VpcIpamPool
        name: example
        properties:
          addressFamily: ipv4
          ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}
          locale: ${current.name}
      exampleVpcIpam:
        type: aws:ec2:VpcIpam
        name: example
        properties:
          operatingRegions:
            - regionName: ${current.name}
    variables:
      current:
        fn::invoke:
          Function: aws:getRegion
          Arguments: {}
    

    Create VpcIpamPoolCidrAllocation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpcIpamPoolCidrAllocation(name: string, args: VpcIpamPoolCidrAllocationArgs, opts?: CustomResourceOptions);
    @overload
    def VpcIpamPoolCidrAllocation(resource_name: str,
                                  args: VpcIpamPoolCidrAllocationArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcIpamPoolCidrAllocation(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  ipam_pool_id: Optional[str] = None,
                                  cidr: Optional[str] = None,
                                  description: Optional[str] = None,
                                  disallowed_cidrs: Optional[Sequence[str]] = None,
                                  netmask_length: Optional[int] = None)
    func NewVpcIpamPoolCidrAllocation(ctx *Context, name string, args VpcIpamPoolCidrAllocationArgs, opts ...ResourceOption) (*VpcIpamPoolCidrAllocation, error)
    public VpcIpamPoolCidrAllocation(string name, VpcIpamPoolCidrAllocationArgs args, CustomResourceOptions? opts = null)
    public VpcIpamPoolCidrAllocation(String name, VpcIpamPoolCidrAllocationArgs args)
    public VpcIpamPoolCidrAllocation(String name, VpcIpamPoolCidrAllocationArgs args, CustomResourceOptions options)
    
    type: aws:ec2:VpcIpamPoolCidrAllocation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpcIpamPoolCidrAllocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VpcIpamPoolCidrAllocationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VpcIpamPoolCidrAllocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcIpamPoolCidrAllocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcIpamPoolCidrAllocationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpcIpamPoolCidrAllocationResource = new Aws.Ec2.VpcIpamPoolCidrAllocation("vpcIpamPoolCidrAllocationResource", new()
    {
        IpamPoolId = "string",
        Cidr = "string",
        Description = "string",
        DisallowedCidrs = new[]
        {
            "string",
        },
        NetmaskLength = 0,
    });
    
    example, err := ec2.NewVpcIpamPoolCidrAllocation(ctx, "vpcIpamPoolCidrAllocationResource", &ec2.VpcIpamPoolCidrAllocationArgs{
    	IpamPoolId:  pulumi.String("string"),
    	Cidr:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	DisallowedCidrs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	NetmaskLength: pulumi.Int(0),
    })
    
    var vpcIpamPoolCidrAllocationResource = new VpcIpamPoolCidrAllocation("vpcIpamPoolCidrAllocationResource", VpcIpamPoolCidrAllocationArgs.builder()
        .ipamPoolId("string")
        .cidr("string")
        .description("string")
        .disallowedCidrs("string")
        .netmaskLength(0)
        .build());
    
    vpc_ipam_pool_cidr_allocation_resource = aws.ec2.VpcIpamPoolCidrAllocation("vpcIpamPoolCidrAllocationResource",
        ipam_pool_id="string",
        cidr="string",
        description="string",
        disallowed_cidrs=["string"],
        netmask_length=0)
    
    const vpcIpamPoolCidrAllocationResource = new aws.ec2.VpcIpamPoolCidrAllocation("vpcIpamPoolCidrAllocationResource", {
        ipamPoolId: "string",
        cidr: "string",
        description: "string",
        disallowedCidrs: ["string"],
        netmaskLength: 0,
    });
    
    type: aws:ec2:VpcIpamPoolCidrAllocation
    properties:
        cidr: string
        description: string
        disallowedCidrs:
            - string
        ipamPoolId: string
        netmaskLength: 0
    

    VpcIpamPoolCidrAllocation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VpcIpamPoolCidrAllocation resource accepts the following input properties:

    IpamPoolId string
    The ID of the pool to which you want to assign a CIDR.
    Cidr string
    The CIDR you want to assign to the pool.
    Description string
    The description for the allocation.
    DisallowedCidrs List<string>
    Exclude a particular CIDR range from being returned by the pool.
    NetmaskLength int
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    IpamPoolId string
    The ID of the pool to which you want to assign a CIDR.
    Cidr string
    The CIDR you want to assign to the pool.
    Description string
    The description for the allocation.
    DisallowedCidrs []string
    Exclude a particular CIDR range from being returned by the pool.
    NetmaskLength int
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    ipamPoolId String
    The ID of the pool to which you want to assign a CIDR.
    cidr String
    The CIDR you want to assign to the pool.
    description String
    The description for the allocation.
    disallowedCidrs List<String>
    Exclude a particular CIDR range from being returned by the pool.
    netmaskLength Integer
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    ipamPoolId string
    The ID of the pool to which you want to assign a CIDR.
    cidr string
    The CIDR you want to assign to the pool.
    description string
    The description for the allocation.
    disallowedCidrs string[]
    Exclude a particular CIDR range from being returned by the pool.
    netmaskLength number
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    ipam_pool_id str
    The ID of the pool to which you want to assign a CIDR.
    cidr str
    The CIDR you want to assign to the pool.
    description str
    The description for the allocation.
    disallowed_cidrs Sequence[str]
    Exclude a particular CIDR range from being returned by the pool.
    netmask_length int
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    ipamPoolId String
    The ID of the pool to which you want to assign a CIDR.
    cidr String
    The CIDR you want to assign to the pool.
    description String
    The description for the allocation.
    disallowedCidrs List<String>
    Exclude a particular CIDR range from being returned by the pool.
    netmaskLength Number
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcIpamPoolCidrAllocation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IpamPoolAllocationId string
    ResourceId string
    The ID of the resource.
    ResourceOwner string
    The owner of the resource.
    ResourceType string
    The type of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpamPoolAllocationId string
    ResourceId string
    The ID of the resource.
    ResourceOwner string
    The owner of the resource.
    ResourceType string
    The type of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    ipamPoolAllocationId String
    resourceId String
    The ID of the resource.
    resourceOwner String
    The owner of the resource.
    resourceType String
    The type of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    ipamPoolAllocationId string
    resourceId string
    The ID of the resource.
    resourceOwner string
    The owner of the resource.
    resourceType string
    The type of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    ipam_pool_allocation_id str
    resource_id str
    The ID of the resource.
    resource_owner str
    The owner of the resource.
    resource_type str
    The type of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    ipamPoolAllocationId String
    resourceId String
    The ID of the resource.
    resourceOwner String
    The owner of the resource.
    resourceType String
    The type of the resource.

    Look up Existing VpcIpamPoolCidrAllocation Resource

    Get an existing VpcIpamPoolCidrAllocation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VpcIpamPoolCidrAllocationState, opts?: CustomResourceOptions): VpcIpamPoolCidrAllocation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cidr: Optional[str] = None,
            description: Optional[str] = None,
            disallowed_cidrs: Optional[Sequence[str]] = None,
            ipam_pool_allocation_id: Optional[str] = None,
            ipam_pool_id: Optional[str] = None,
            netmask_length: Optional[int] = None,
            resource_id: Optional[str] = None,
            resource_owner: Optional[str] = None,
            resource_type: Optional[str] = None) -> VpcIpamPoolCidrAllocation
    func GetVpcIpamPoolCidrAllocation(ctx *Context, name string, id IDInput, state *VpcIpamPoolCidrAllocationState, opts ...ResourceOption) (*VpcIpamPoolCidrAllocation, error)
    public static VpcIpamPoolCidrAllocation Get(string name, Input<string> id, VpcIpamPoolCidrAllocationState? state, CustomResourceOptions? opts = null)
    public static VpcIpamPoolCidrAllocation get(String name, Output<String> id, VpcIpamPoolCidrAllocationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Cidr string
    The CIDR you want to assign to the pool.
    Description string
    The description for the allocation.
    DisallowedCidrs List<string>
    Exclude a particular CIDR range from being returned by the pool.
    IpamPoolAllocationId string
    IpamPoolId string
    The ID of the pool to which you want to assign a CIDR.
    NetmaskLength int
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    ResourceId string
    The ID of the resource.
    ResourceOwner string
    The owner of the resource.
    ResourceType string
    The type of the resource.
    Cidr string
    The CIDR you want to assign to the pool.
    Description string
    The description for the allocation.
    DisallowedCidrs []string
    Exclude a particular CIDR range from being returned by the pool.
    IpamPoolAllocationId string
    IpamPoolId string
    The ID of the pool to which you want to assign a CIDR.
    NetmaskLength int
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    ResourceId string
    The ID of the resource.
    ResourceOwner string
    The owner of the resource.
    ResourceType string
    The type of the resource.
    cidr String
    The CIDR you want to assign to the pool.
    description String
    The description for the allocation.
    disallowedCidrs List<String>
    Exclude a particular CIDR range from being returned by the pool.
    ipamPoolAllocationId String
    ipamPoolId String
    The ID of the pool to which you want to assign a CIDR.
    netmaskLength Integer
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    resourceId String
    The ID of the resource.
    resourceOwner String
    The owner of the resource.
    resourceType String
    The type of the resource.
    cidr string
    The CIDR you want to assign to the pool.
    description string
    The description for the allocation.
    disallowedCidrs string[]
    Exclude a particular CIDR range from being returned by the pool.
    ipamPoolAllocationId string
    ipamPoolId string
    The ID of the pool to which you want to assign a CIDR.
    netmaskLength number
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    resourceId string
    The ID of the resource.
    resourceOwner string
    The owner of the resource.
    resourceType string
    The type of the resource.
    cidr str
    The CIDR you want to assign to the pool.
    description str
    The description for the allocation.
    disallowed_cidrs Sequence[str]
    Exclude a particular CIDR range from being returned by the pool.
    ipam_pool_allocation_id str
    ipam_pool_id str
    The ID of the pool to which you want to assign a CIDR.
    netmask_length int
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    resource_id str
    The ID of the resource.
    resource_owner str
    The owner of the resource.
    resource_type str
    The type of the resource.
    cidr String
    The CIDR you want to assign to the pool.
    description String
    The description for the allocation.
    disallowedCidrs List<String>
    Exclude a particular CIDR range from being returned by the pool.
    ipamPoolAllocationId String
    ipamPoolId String
    The ID of the pool to which you want to assign a CIDR.
    netmaskLength Number
    The netmask length of the CIDR you would like to allocate to the IPAM pool. Valid Values: 0-128.
    resourceId String
    The ID of the resource.
    resourceOwner String
    The owner of the resource.
    resourceType String
    The type of the resource.

    Import

    Using pulumi import, import IPAM allocations using the allocation id and pool id, separated by _. For example:

    $ pulumi import aws:ec2/vpcIpamPoolCidrAllocation:VpcIpamPoolCidrAllocation example ipam-pool-alloc-0dc6d196509c049ba8b549ff99f639736_ipam-pool-07cfb559e0921fcbe
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi