-
Notifications
You must be signed in to change notification settings - Fork 151
/
getSecurityGroups.go
41 lines (36 loc) · 1.71 KB
/
getSecurityGroups.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ec2
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to get IDs and VPC membership of Security Groups that are created
// outside of this provider.
func GetSecurityGroups(ctx *pulumi.Context, args *GetSecurityGroupsArgs, opts ...pulumi.InvokeOption) (*GetSecurityGroupsResult, error) {
var rv GetSecurityGroupsResult
err := ctx.Invoke("aws:ec2/getSecurityGroups:getSecurityGroups", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSecurityGroups.
type GetSecurityGroupsArgs struct {
// 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].
Filters []GetSecurityGroupsFilter `pulumi:"filters"`
// A map of tags, each pair of which must exactly match for desired security groups.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getSecurityGroups.
type GetSecurityGroupsResult struct {
// ARNs of the matched security groups.
Arns []string `pulumi:"arns"`
Filters []GetSecurityGroupsFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// IDs of the matches security groups.
Ids []string `pulumi:"ids"`
Tags map[string]string `pulumi:"tags"`
// 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.
VpcIds []string `pulumi:"vpcIds"`
}