getSecurityGroups

Use this data source to get IDs and VPC membership of Security Groups that are created outside of this provider.

Using getSecurityGroups

function getSecurityGroups(args: GetSecurityGroupsArgs, opts?: InvokeOptions): Promise<GetSecurityGroupsResult>
def get_security_groups(filters: Optional[Sequence[GetSecurityGroupsFilter]] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetSecurityGroupsResult
func GetSecurityGroups(ctx *Context, args *GetSecurityGroupsArgs, opts ...InvokeOption) (*GetSecurityGroupsResult, error)

Note: This function is named GetSecurityGroups in the Go SDK.

public static class GetSecurityGroups {
    public static Task<GetSecurityGroupsResult> InvokeAsync(GetSecurityGroupsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetSecurityGroupsFilter>
One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-security-groups in the AWS CLI reference][1].
Tags Dictionary<string, string>
A map of tags, each pair of which must exactly match for desired security groups.
Filters []GetSecurityGroupsFilter
One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-security-groups in the AWS CLI reference][1].
Tags map[string]string
A map of tags, each pair of which must exactly match for desired security groups.
filters GetSecurityGroupsFilter[]
One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-security-groups in the AWS CLI reference][1].
tags {[key: string]: string}
A map of tags, each pair of which must exactly match for desired security groups.
filters Sequence[GetSecurityGroupsFilter]
One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-security-groups in the AWS CLI reference][1].
tags Mapping[str, str]
A map of tags, each pair of which must exactly match for desired security groups.

getSecurityGroups Result

The following output properties are available:

Arns List<string>
ARNs of the matched security groups.
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
IDs of the matches security groups.
Tags Dictionary<string, string>
VpcIds List<string>
The VPC IDs of the matched security groups. The data source’s tag or filter will span VPCs unless the vpc-id filter is also used.
Filters List<GetSecurityGroupsFilter>
Arns []string
ARNs of the matched security groups.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
IDs of the matches security groups.
Tags map[string]string
VpcIds []string
The VPC IDs of the matched security groups. The data source’s tag or filter will span VPCs unless the vpc-id filter is also used.
Filters []GetSecurityGroupsFilter
arns string[]
ARNs of the matched security groups.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
IDs of the matches security groups.
tags {[key: string]: string}
vpcIds string[]
The VPC IDs of the matched security groups. The data source’s tag or filter will span VPCs unless the vpc-id filter is also used.
filters GetSecurityGroupsFilter[]
arns Sequence[str]
ARNs of the matched security groups.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
IDs of the matches security groups.
tags Mapping[str, str]
vpc_ids Sequence[str]
The VPC IDs of the matched security groups. The data source’s tag or filter will span VPCs unless the vpc-id filter is also used.
filters Sequence[GetSecurityGroupsFilter]

Supporting Types

GetSecurityGroupsFilter

Name string
Values List<string>
Name string
Values []string
name string
values string[]
name str
values Sequence[str]

Package Details

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