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:
- Vpc
Id string The VPC ID that you want to filter from.
- Filters
List<Get
Subnet Ids Filter Args> Custom filter block as described below.
- Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired subnets.
- Vpc
Id string The VPC ID that you want to filter from.
- Filters
[]Get
Subnet Ids Filter Custom filter block as described below.
- map[string]string
A map of tags, each pair of which must exactly match a pair on the desired subnets.
- vpc
Id string The VPC ID that you want to filter from.
- filters
Get
Subnet Ids Filter[] Custom filter block as described below.
- {[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[Get
Subnet Ids Filter] Custom filter block as described below.
- 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.
- Dictionary<string, string>
- Vpc
Id string - Filters
List<Get
Subnet Ids Filter>
Supporting Types
GetSubnetIdsFilter
- 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
awsTerraform Provider.