/
getVpnGateway.go
81 lines (76 loc) · 2.64 KB
/
getVpnGateway.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// *** 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"
)
// The VPN Gateway data source provides details about
// a specific VPN gateway.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// selected, err := ec2.LookupVpnGateway(ctx, &ec2.LookupVpnGatewayArgs{
// Filters: []ec2.GetVpnGatewayFilter{
// ec2.GetVpnGatewayFilter{
// Name: "tag:Name",
// Values: []string{
// "vpn-gw",
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("vpnGatewayId", selected.Id)
// return nil
// })
// }
// ```
func LookupVpnGateway(ctx *pulumi.Context, args *LookupVpnGatewayArgs, opts ...pulumi.InvokeOption) (*LookupVpnGatewayResult, error) {
var rv LookupVpnGatewayResult
err := ctx.Invoke("aws:ec2/getVpnGateway:getVpnGateway", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVpnGateway.
type LookupVpnGatewayArgs struct {
// The Autonomous System Number (ASN) for the Amazon side of the specific VPN Gateway to retrieve.
AmazonSideAsn *string `pulumi:"amazonSideAsn"`
// The ID of a VPC attached to the specific VPN Gateway to retrieve.
AttachedVpcId *string `pulumi:"attachedVpcId"`
// The Availability Zone of the specific VPN Gateway to retrieve.
AvailabilityZone *string `pulumi:"availabilityZone"`
// Custom filter block as described below.
Filters []GetVpnGatewayFilter `pulumi:"filters"`
// The ID of the specific VPN Gateway to retrieve.
Id *string `pulumi:"id"`
// The state of the specific VPN Gateway to retrieve.
State *string `pulumi:"state"`
// A map of tags, each pair of which must exactly match
// a pair on the desired VPN Gateway.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getVpnGateway.
type LookupVpnGatewayResult struct {
AmazonSideAsn string `pulumi:"amazonSideAsn"`
Arn string `pulumi:"arn"`
AttachedVpcId string `pulumi:"attachedVpcId"`
AvailabilityZone string `pulumi:"availabilityZone"`
Filters []GetVpnGatewayFilter `pulumi:"filters"`
Id string `pulumi:"id"`
State string `pulumi:"state"`
Tags map[string]string `pulumi:"tags"`
}