Try AWS Native preview for resources not in the classic version.
aws.ec2.VpcIpamScope
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Creates a scope for AWS 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.name),
}]});
const exampleVpcIpamScope = new aws.ec2.VpcIpamScope("example", {
ipamId: example.id,
description: "Another Scope",
});
import pulumi
import pulumi_aws as aws
current = aws.get_region()
example = aws.ec2.VpcIpam("example", operating_regions=[{
"regionName": current.name,
}])
example_vpc_ipam_scope = aws.ec2.VpcIpamScope("example",
ipam_id=example.id,
description="Another Scope")
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
}
example, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
OperatingRegions: ec2.VpcIpamOperatingRegionArray{
&ec2.VpcIpamOperatingRegionArgs{
RegionName: pulumi.String(current.Name),
},
},
})
if err != nil {
return err
}
_, err = ec2.NewVpcIpamScope(ctx, "example", &ec2.VpcIpamScopeArgs{
IpamId: example.ID(),
Description: pulumi.String("Another Scope"),
})
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 example = new Aws.Ec2.VpcIpam("example", new()
{
OperatingRegions = new[]
{
new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
{
RegionName = current.Apply(getRegionResult => getRegionResult.Name),
},
},
});
var exampleVpcIpamScope = new Aws.Ec2.VpcIpamScope("example", new()
{
IpamId = example.Id,
Description = "Another Scope",
});
});
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.VpcIpamScope;
import com.pulumi.aws.ec2.VpcIpamScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var current = AwsFunctions.getRegion();
var example = new VpcIpam("example", VpcIpamArgs.builder()
.operatingRegions(VpcIpamOperatingRegionArgs.builder()
.regionName(current.applyValue(getRegionResult -> getRegionResult.name()))
.build())
.build());
var exampleVpcIpamScope = new VpcIpamScope("exampleVpcIpamScope", VpcIpamScopeArgs.builder()
.ipamId(example.id())
.description("Another Scope")
.build());
}
}
resources:
example:
type: aws:ec2:VpcIpam
properties:
operatingRegions:
- regionName: ${current.name}
exampleVpcIpamScope:
type: aws:ec2:VpcIpamScope
name: example
properties:
ipamId: ${example.id}
description: Another Scope
variables:
current:
fn::invoke:
Function: aws:getRegion
Arguments: {}
Create VpcIpamScope Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcIpamScope(name: string, args: VpcIpamScopeArgs, opts?: CustomResourceOptions);
@overload
def VpcIpamScope(resource_name: str,
args: VpcIpamScopeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcIpamScope(resource_name: str,
opts: Optional[ResourceOptions] = None,
ipam_id: Optional[str] = None,
description: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewVpcIpamScope(ctx *Context, name string, args VpcIpamScopeArgs, opts ...ResourceOption) (*VpcIpamScope, error)
public VpcIpamScope(string name, VpcIpamScopeArgs args, CustomResourceOptions? opts = null)
public VpcIpamScope(String name, VpcIpamScopeArgs args)
public VpcIpamScope(String name, VpcIpamScopeArgs args, CustomResourceOptions options)
type: aws:ec2:VpcIpamScope
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 VpcIpamScopeArgs
- 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 VpcIpamScopeArgs
- 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 VpcIpamScopeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcIpamScopeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcIpamScopeArgs
- 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 vpcIpamScopeResource = new Aws.Ec2.VpcIpamScope("vpcIpamScopeResource", new()
{
IpamId = "string",
Description = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ec2.NewVpcIpamScope(ctx, "vpcIpamScopeResource", &ec2.VpcIpamScopeArgs{
IpamId: pulumi.String("string"),
Description: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var vpcIpamScopeResource = new VpcIpamScope("vpcIpamScopeResource", VpcIpamScopeArgs.builder()
.ipamId("string")
.description("string")
.tags(Map.of("string", "string"))
.build());
vpc_ipam_scope_resource = aws.ec2.VpcIpamScope("vpcIpamScopeResource",
ipam_id="string",
description="string",
tags={
"string": "string",
})
const vpcIpamScopeResource = new aws.ec2.VpcIpamScope("vpcIpamScopeResource", {
ipamId: "string",
description: "string",
tags: {
string: "string",
},
});
type: aws:ec2:VpcIpamScope
properties:
description: string
ipamId: string
tags:
string: string
VpcIpamScope 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 VpcIpamScope resource accepts the following input properties:
- Ipam
Id string - The ID of the IPAM for which you're creating this scope.
- Description string
- A description for the scope you're creating.
- Dictionary<string, string>
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Ipam
Id string - The ID of the IPAM for which you're creating this scope.
- Description string
- A description for the scope you're creating.
- map[string]string
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- ipam
Id String - The ID of the IPAM for which you're creating this scope.
- description String
- A description for the scope you're creating.
- Map<String,String>
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- ipam
Id string - The ID of the IPAM for which you're creating this scope.
- description string
- A description for the scope you're creating.
- {[key: string]: string}
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- ipam_
id str - The ID of the IPAM for which you're creating this scope.
- description str
- A description for the scope you're creating.
- Mapping[str, str]
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- ipam
Id String - The ID of the IPAM for which you're creating this scope.
- description String
- A description for the scope you're creating.
- Map<String>
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcIpamScope resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the scope.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipam
Arn string - The ARN of the IPAM for which you're creating this scope.
- Ipam
Scope stringType - Is
Default bool - Defines if the scope is the default scope or not.
- Pool
Count int - The number of pools in the scope.
- Dictionary<string, string>
- Arn string
- The Amazon Resource Name (ARN) of the scope.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipam
Arn string - The ARN of the IPAM for which you're creating this scope.
- Ipam
Scope stringType - Is
Default bool - Defines if the scope is the default scope or not.
- Pool
Count int - The number of pools in the scope.
- map[string]string
- arn String
- The Amazon Resource Name (ARN) of the scope.
- id String
- The provider-assigned unique ID for this managed resource.
- ipam
Arn String - The ARN of the IPAM for which you're creating this scope.
- ipam
Scope StringType - is
Default Boolean - Defines if the scope is the default scope or not.
- pool
Count Integer - The number of pools in the scope.
- Map<String,String>
- arn string
- The Amazon Resource Name (ARN) of the scope.
- id string
- The provider-assigned unique ID for this managed resource.
- ipam
Arn string - The ARN of the IPAM for which you're creating this scope.
- ipam
Scope stringType - is
Default boolean - Defines if the scope is the default scope or not.
- pool
Count number - The number of pools in the scope.
- {[key: string]: string}
- arn str
- The Amazon Resource Name (ARN) of the scope.
- id str
- The provider-assigned unique ID for this managed resource.
- ipam_
arn str - The ARN of the IPAM for which you're creating this scope.
- ipam_
scope_ strtype - is_
default bool - Defines if the scope is the default scope or not.
- pool_
count int - The number of pools in the scope.
- Mapping[str, str]
- arn String
- The Amazon Resource Name (ARN) of the scope.
- id String
- The provider-assigned unique ID for this managed resource.
- ipam
Arn String - The ARN of the IPAM for which you're creating this scope.
- ipam
Scope StringType - is
Default Boolean - Defines if the scope is the default scope or not.
- pool
Count Number - The number of pools in the scope.
- Map<String>
Look up Existing VpcIpamScope Resource
Get an existing VpcIpamScope 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?: VpcIpamScopeState, opts?: CustomResourceOptions): VpcIpamScope
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
description: Optional[str] = None,
ipam_arn: Optional[str] = None,
ipam_id: Optional[str] = None,
ipam_scope_type: Optional[str] = None,
is_default: Optional[bool] = None,
pool_count: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> VpcIpamScope
func GetVpcIpamScope(ctx *Context, name string, id IDInput, state *VpcIpamScopeState, opts ...ResourceOption) (*VpcIpamScope, error)
public static VpcIpamScope Get(string name, Input<string> id, VpcIpamScopeState? state, CustomResourceOptions? opts = null)
public static VpcIpamScope get(String name, Output<String> id, VpcIpamScopeState 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.
- Arn string
- The Amazon Resource Name (ARN) of the scope.
- Description string
- A description for the scope you're creating.
- Ipam
Arn string - The ARN of the IPAM for which you're creating this scope.
- Ipam
Id string - The ID of the IPAM for which you're creating this scope.
- Ipam
Scope stringType - Is
Default bool - Defines if the scope is the default scope or not.
- Pool
Count int - The number of pools in the scope.
- Dictionary<string, string>
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Arn string
- The Amazon Resource Name (ARN) of the scope.
- Description string
- A description for the scope you're creating.
- Ipam
Arn string - The ARN of the IPAM for which you're creating this scope.
- Ipam
Id string - The ID of the IPAM for which you're creating this scope.
- Ipam
Scope stringType - Is
Default bool - Defines if the scope is the default scope or not.
- Pool
Count int - The number of pools in the scope.
- map[string]string
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- arn String
- The Amazon Resource Name (ARN) of the scope.
- description String
- A description for the scope you're creating.
- ipam
Arn String - The ARN of the IPAM for which you're creating this scope.
- ipam
Id String - The ID of the IPAM for which you're creating this scope.
- ipam
Scope StringType - is
Default Boolean - Defines if the scope is the default scope or not.
- pool
Count Integer - The number of pools in the scope.
- Map<String,String>
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- arn string
- The Amazon Resource Name (ARN) of the scope.
- description string
- A description for the scope you're creating.
- ipam
Arn string - The ARN of the IPAM for which you're creating this scope.
- ipam
Id string - The ID of the IPAM for which you're creating this scope.
- ipam
Scope stringType - is
Default boolean - Defines if the scope is the default scope or not.
- pool
Count number - The number of pools in the scope.
- {[key: string]: string}
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- arn str
- The Amazon Resource Name (ARN) of the scope.
- description str
- A description for the scope you're creating.
- ipam_
arn str - The ARN of the IPAM for which you're creating this scope.
- ipam_
id str - The ID of the IPAM for which you're creating this scope.
- ipam_
scope_ strtype - is_
default bool - Defines if the scope is the default scope or not.
- pool_
count int - The number of pools in the scope.
- Mapping[str, str]
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- arn String
- The Amazon Resource Name (ARN) of the scope.
- description String
- A description for the scope you're creating.
- ipam
Arn String - The ARN of the IPAM for which you're creating this scope.
- ipam
Id String - The ID of the IPAM for which you're creating this scope.
- ipam
Scope StringType - is
Default Boolean - Defines if the scope is the default scope or not.
- pool
Count Number - The number of pools in the scope.
- Map<String>
- Key-value mapping of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
Import
Using pulumi import
, import IPAMs using the scope_id
. For example:
$ pulumi import aws:ec2/vpcIpamScope:VpcIpamScope example ipam-scope-0513c69f283d11dfb
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.
Try AWS Native preview for resources not in the classic version.