GetSubnetIds

aws.ec2.getSubnetIds provides a set of ids for a vpc_id

This resource can be useful for getting back a set of subnet ids for a vpc.

Using GetSubnetIds

function getSubnetIds(args: GetSubnetIdsArgs, opts?: InvokeOptions): Promise<GetSubnetIdsResult>
function  get_subnet_ids(filters=None, tags=None, vpc_id=None, opts=None)
func GetSubnetIds(ctx *Context, args *GetSubnetIdsArgs, opts ...InvokeOption) (*GetSubnetIdsResult, error)
public static class GetSubnetIds {
    public static Task<GetSubnetIdsResult> InvokeAsync(GetSubnetIdsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

VpcId string

The VPC ID that you want to filter from.

Filters List<GetSubnetIdsFilterArgs>

Custom filter block as described below.

Tags Dictionary<string, string>

A map of tags, each pair of which must exactly match a pair on the desired subnets.

VpcId string

The VPC ID that you want to filter from.

Filters []GetSubnetIdsFilter

Custom filter block as described below.

Tags map[string]string

A map of tags, each pair of which must exactly match a pair on the desired subnets.

vpcId string

The VPC ID that you want to filter from.

filters GetSubnetIdsFilter[]

Custom filter block as described below.

tags {[key: string]: string}

A map of tags, each pair of which must exactly match a pair on the desired subnets.

vpc_id str

The VPC ID that you want to filter from.

filters List[GetSubnetIdsFilter]

Custom filter block as described below.

tags Dict[str, str]

A map of tags, each pair of which must exactly match a pair on the desired subnets.

GetSubnetIds Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A set of all the subnet ids found. This data source will fail if none are found.

Tags Dictionary<string, string>
VpcId string
Filters List<GetSubnetIdsFilter>
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A set of all the subnet ids found. This data source will fail if none are found.

Tags map[string]string
VpcId string
Filters []GetSubnetIdsFilter
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A set of all the subnet ids found. This data source will fail if none are found.

tags {[key: string]: string}
vpcId string
filters GetSubnetIdsFilter[]
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A set of all the subnet ids found. This data source will fail if none are found.

tags Dict[str, str]
vpc_id str
filters List[GetSubnetIdsFilter]

Supporting Types

GetSubnetIdsFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tag Name, use:

Values List<string>

Set of values that are accepted for the given field. Subnet IDs will be selected if any one of the given values match.

Name string

The name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tag Name, use:

Values []string

Set of values that are accepted for the given field. Subnet IDs will be selected if any one of the given values match.

name string

The name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tag Name, use:

values string[]

Set of values that are accepted for the given field. Subnet IDs will be selected if any one of the given values match.

name str

The name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tag Name, use:

values List[str]

Set of values that are accepted for the given field. Subnet IDs will be selected if any one of the given values match.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.