VpcIpam class
Provides an IPAM resource.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.getRegion({});
const main = new aws.ec2.VpcIpam("main", {
operatingRegions: [{
regionName: current.then(current => current.region),
}],
description: "My IPAM",
tags: {
Test: "Main",
},
});
import pulumi
import pulumi_aws as aws
current = aws.get_region()
main = aws.ec2.VpcIpam("main",
operating_regions=[{
"region_name": current.region,
}],
description="My IPAM",
tags={
"Test": "Main",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var current = Aws.GetRegion.Invoke();
var main = new Aws.Ec2.VpcIpam("main", new()
{
OperatingRegions = new[]
{
new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
{
RegionName = current.Apply(getRegionResult => getRegionResult.Region),
},
},
Description = "My IPAM",
Tags =
{
{ "Test", "Main" },
},
});
});
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
}
_, err = ec2.NewVpcIpam(ctx, "main", &ec2.VpcIpamArgs{
OperatingRegions: ec2.VpcIpamOperatingRegionArray{
&ec2.VpcIpamOperatingRegionArgs{
RegionName: pulumi.String(current.Region),
},
},
Description: pulumi.String("My IPAM"),
Tags: pulumi.StringMap{
"Test": pulumi.String("Main"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_getregion" "current" {
}
resource "aws_ec2_vpcipam" "main" {
operating_regions {
region_name = data.aws_getregion.current.region
}
description = "My IPAM"
tags = {
"Test" = "Main"
}
}
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 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 main = new VpcIpam("main", VpcIpamArgs.builder()
.operatingRegions(VpcIpamOperatingRegionArgs.builder()
.regionName(current.region())
.build())
.description("My IPAM")
.tags(Map.of("Test", "Main"))
.build());
}
}
resources:
main:
type: aws:ec2:VpcIpam
properties:
operatingRegions:
- regionName: ${current.region}
description: My IPAM
tags:
Test: Main
variables:
current:
fn::invoke:
function: aws:getRegion
arguments: {}
Shared with multiple operating_regions:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const current = aws.getRegion({});
const config = new pulumi.Config();
const ipamRegions = config.getObject<Array<any>>("ipamRegions") || [
"us-east-1",
"us-west-2",
];
// ensure current provider region is an operating_regions entry
const allIpamRegions = std.concat({
input: [
[current.then(current => current.region)],
ipamRegions,
],
}).then(invoke => std.distinct({
input: invoke.result,
})).then(invoke => invoke.result);
const main = new aws.ec2.VpcIpam("main", {
operatingRegions: .map(entry => ({
regionName: entry,
})),
description: "multi region ipam",
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
current = aws.get_region()
config = pulumi.Config()
ipam_regions = config.get_object("ipamRegions")
if ipam_regions is None:
ipam_regions = [
"us-east-1",
"us-west-2",
]
# ensure current provider region is an operating_regions entry
all_ipam_regions = std.distinct(input=std.concat(input=[
[current.region],
ipam_regions,
]).result).result
main = aws.ec2.VpcIpam("main",
operating_regions=[{
"region_name": entry,
} for entry in all_ipam_regions],
description="multi region ipam")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var current = Aws.GetRegion.Invoke();
var config = new Config();
var ipamRegions = config.GetObject<dynamic[]>("ipamRegions") ?? new[]
{
"us-east-1",
"us-west-2",
};
// ensure current provider region is an operating_regions entry
var allIpamRegions = Std.Concat.Invoke(new()
{
Input = new[]
{
new[]
{
current.Apply(getRegionResult => getRegionResult.Region),
},
ipamRegions,
},
}).Apply(invoke => Std.Distinct.Invoke(new()
{
Input = invoke.Result,
})).Apply(invoke => invoke.Result);
var main = new Aws.Ec2.VpcIpam("main", new()
{
OperatingRegions = .Select(entry =>
{
return new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
{
RegionName = entry,
};
}).ToList(),
Description = "multi region ipam",
});
});
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
std = {
source = "pulumi/std"
}
}
}
data "aws_getregion" "current" {
}
data "std_concat" "invoke_1" {
input = [[data.aws_getregion.current.region], var.ipamRegions]
}
resource "aws_ec2_vpcipam" "main" {
dynamic "operating_regions" {
for_each = local.allIpamRegions
content {
region_name = operating_regions.value
}
}
description = "multi region ipam"
}
variable "ipamRegions" {
type = list(any)
default = ["us-east-1", "us-west-2"]
}
# ensure current provider region is an operating_regions entry
locals {
allIpamRegions = distinct(data.std_concat.invoke_1.result)
}
Import
Using pulumi import, import IPAMs using the IPAM id. For example:
$ pulumi import aws:ec2/vpcIpam:VpcIpam example ipam-0178368ad2146a492
Constructors
- VpcIpam(String name, {VpcIpamArgs? args, CustomResourceOptions? options})
-
Creates a new VpcIpam.
nameThe Pulumi resource name.argsArguments used to configure this VpcIpam. The set of arguments for VpcIpam.optionsResource options controlling this resource's behavior. - VpcIpam.reference(String urn)
- Creates a typed reference to an existing VpcIpam resource.
Properties
-
arn
↔ Output<
String> -
ARN of IPAM
latefinal
-
cascade
↔ Output<
bool?> -
Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
defaultResourceDiscoveryAssociationId
↔ Output<
String> -
The IPAM's default resource discovery association ID.
latefinal
-
defaultResourceDiscoveryId
↔ Output<
String> -
The IPAM's default resource discovery ID.
latefinal
-
description
↔ Output<
String?> -
A description for the IPAM.
latefinal
-
enablePrivateGua
↔ Output<
bool?> -
Enable this option to use your own GUA ranges as private IPv6 addresses. Default:
false.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- 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
-
meteredAccount
↔ Output<
String> -
AWS account that is charged for active IP addresses managed in IPAM. Valid values are
ipam-owner(default) andresource-owner.latefinal -
operatingRegions
↔ Output<
List< VpcIpamOperatingRegion> > -
Determines which locales can be chosen when you create pools. 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. You specify a region using the regionName parameter. You must set your provider block region as an operating_region.
latefinal
-
privateDefaultScopeId
↔ Output<
String> -
The ID of the IPAM's private scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private IP space. The public scope is intended for all internet-routable IP space.
latefinal
-
publicDefaultScopeId
↔ Output<
String> -
The ID of the IPAM's public scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private
IP space. The public scope is intended for all internet-routable IP space.
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
-
scopeCount
↔ Output<
int> -
The number of scopes in the IPAM.
latefinal
-
A map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
tier
↔ Output<
String?> -
specifies the IPAM tier. Valid options include
freeandadvanced. Default isadvanced.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