/
getVpcAttachment.go
105 lines (100 loc) · 3.11 KB
/
getVpcAttachment.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// *** 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 ec2transitgateway
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information on an EC2 Transit Gateway VPC Attachment.
//
// ## Example Usage
// ### By Filter
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2transitgateway"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ec2transitgateway.LookupVpcAttachment(ctx, &ec2transitgateway.LookupVpcAttachmentArgs{
// Filters: []ec2transitgateway.GetVpcAttachmentFilter{
// ec2transitgateway.GetVpcAttachmentFilter{
// Name: "vpc-id",
// Values: []string{
// "vpc-12345678",
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### By Identifier
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2transitgateway"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "tgw-attach-12345678"
// _, err := ec2transitgateway.LookupVpcAttachment(ctx, &ec2transitgateway.LookupVpcAttachmentArgs{
// Id: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupVpcAttachment(ctx *pulumi.Context, args *LookupVpcAttachmentArgs, opts ...pulumi.InvokeOption) (*LookupVpcAttachmentResult, error) {
var rv LookupVpcAttachmentResult
err := ctx.Invoke("aws:ec2transitgateway/getVpcAttachment:getVpcAttachment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVpcAttachment.
type LookupVpcAttachmentArgs struct {
// One or more configuration blocks containing name-values filters. Detailed below.
Filters []GetVpcAttachmentFilter `pulumi:"filters"`
// Identifier of the EC2 Transit Gateway VPC Attachment.
Id *string `pulumi:"id"`
// Key-value tags for the EC2 Transit Gateway VPC Attachment
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getVpcAttachment.
type LookupVpcAttachmentResult struct {
// Whether Appliance Mode support is enabled.
ApplianceModeSupport string `pulumi:"applianceModeSupport"`
// Whether DNS support is enabled.
DnsSupport string `pulumi:"dnsSupport"`
Filters []GetVpcAttachmentFilter `pulumi:"filters"`
// EC2 Transit Gateway VPC Attachment identifier
Id string `pulumi:"id"`
// Whether IPv6 support is enabled.
Ipv6Support string `pulumi:"ipv6Support"`
// Identifiers of EC2 Subnets.
SubnetIds []string `pulumi:"subnetIds"`
// Key-value tags for the EC2 Transit Gateway VPC Attachment
Tags map[string]string `pulumi:"tags"`
// EC2 Transit Gateway identifier
TransitGatewayId string `pulumi:"transitGatewayId"`
// Identifier of EC2 VPC.
VpcId string `pulumi:"vpcId"`
// Identifier of the AWS account that owns the EC2 VPC.
VpcOwnerId string `pulumi:"vpcOwnerId"`
}