/
awsTransitGatewayAttachment.go
469 lines (412 loc) · 23 KB
/
awsTransitGatewayAttachment.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hcp
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ram"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// main, err := hcp.NewHvn(ctx, "main", &hcp.HvnArgs{
// HvnId: pulumi.String("main-hvn"),
// CloudProvider: pulumi.String("aws"),
// Region: pulumi.String("us-west-2"),
// CidrBlock: pulumi.String("172.25.16.0/20"),
// })
// if err != nil {
// return err
// }
// exampleVpc, err := ec2.NewVpc(ctx, "exampleVpc", &ec2.VpcArgs{
// CidrBlock: pulumi.String("172.31.0.0/16"),
// })
// if err != nil {
// return err
// }
// exampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, "exampleTransitGateway", &ec2transitgateway.TransitGatewayArgs{
// Tags: pulumi.StringMap{
// "Name": pulumi.String("example-tgw"),
// },
// })
// if err != nil {
// return err
// }
// exampleResourceShare, err := ram.NewResourceShare(ctx, "exampleResourceShare", &ram.ResourceShareArgs{
// AllowExternalPrincipals: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// examplePrincipalAssociation, err := ram.NewPrincipalAssociation(ctx, "examplePrincipalAssociation", &ram.PrincipalAssociationArgs{
// ResourceShareArn: exampleResourceShare.Arn,
// Principal: main.ProviderAccountId,
// })
// if err != nil {
// return err
// }
// exampleResourceAssociation, err := ram.NewResourceAssociation(ctx, "exampleResourceAssociation", &ram.ResourceAssociationArgs{
// ResourceShareArn: exampleResourceShare.Arn,
// ResourceArn: exampleTransitGateway.Arn,
// })
// if err != nil {
// return err
// }
// exampleAwsTransitGatewayAttachment, err := hcp.NewAwsTransitGatewayAttachment(ctx, "exampleAwsTransitGatewayAttachment", &hcp.AwsTransitGatewayAttachmentArgs{
// HvnId: main.HvnId,
// TransitGatewayAttachmentId: pulumi.String("example-tgw-attachment"),
// TransitGatewayId: exampleTransitGateway.ID(),
// ResourceShareArn: exampleResourceShare.Arn,
// }, pulumi.DependsOn([]pulumi.Resource{
// examplePrincipalAssociation,
// exampleResourceAssociation,
// }))
// if err != nil {
// return err
// }
// _, err = hcp.NewHvnRoute(ctx, "route", &hcp.HvnRouteArgs{
// HvnLink: main.SelfLink,
// HvnRouteId: pulumi.String("hvn-to-tgw-attachment"),
// DestinationCidr: exampleVpc.CidrBlock,
// TargetLink: exampleAwsTransitGatewayAttachment.SelfLink,
// })
// if err != nil {
// return err
// }
// _, err = ec2transitgateway.NewVpcAttachmentAccepter(ctx, "exampleVpcAttachmentAccepter", &ec2transitgateway.VpcAttachmentAccepterArgs{
// TransitGatewayAttachmentId: exampleAwsTransitGatewayAttachment.ProviderTransitGatewayAttachmentId,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// # The import ID is {hvn_id}:{transit_gateway_attachment_id}
//
// ```sh
// $ pulumi import hcp:index/awsTransitGatewayAttachment:AwsTransitGatewayAttachment example main-hvn:example-tgw-attachment
// ```
type AwsTransitGatewayAttachment struct {
pulumi.CustomResourceState
// The time that the transit gateway attachment was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into `ACCEPTED` or `ACTIVE` state.
ExpiresAt pulumi.StringOutput `pulumi:"expiresAt"`
// The ID of the HashiCorp Virtual Network (HVN).
HvnId pulumi.StringOutput `pulumi:"hvnId"`
// The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
ProjectId pulumi.StringOutput `pulumi:"projectId"`
// The transit gateway attachment ID used by AWS.
ProviderTransitGatewayAttachmentId pulumi.StringOutput `pulumi:"providerTransitGatewayAttachmentId"`
// The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS.
// The Resource Share should be associated with the HCP AWS account principal (see
// [aws_ram_principal_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_principal_association))
// and the transit gateway resource (see
// [aws_ram_resource_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_resource_association))
ResourceShareArn pulumi.StringOutput `pulumi:"resourceShareArn"`
// A unique URL identifying the transit gateway attachment.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// The state of the transit gateway attachment.
State pulumi.StringOutput `pulumi:"state"`
// The user-settable name of the transit gateway attachment in HCP.
TransitGatewayAttachmentId pulumi.StringOutput `pulumi:"transitGatewayAttachmentId"`
// The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
TransitGatewayId pulumi.StringOutput `pulumi:"transitGatewayId"`
}
// NewAwsTransitGatewayAttachment registers a new resource with the given unique name, arguments, and options.
func NewAwsTransitGatewayAttachment(ctx *pulumi.Context,
name string, args *AwsTransitGatewayAttachmentArgs, opts ...pulumi.ResourceOption) (*AwsTransitGatewayAttachment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.HvnId == nil {
return nil, errors.New("invalid value for required argument 'HvnId'")
}
if args.ResourceShareArn == nil {
return nil, errors.New("invalid value for required argument 'ResourceShareArn'")
}
if args.TransitGatewayAttachmentId == nil {
return nil, errors.New("invalid value for required argument 'TransitGatewayAttachmentId'")
}
if args.TransitGatewayId == nil {
return nil, errors.New("invalid value for required argument 'TransitGatewayId'")
}
opts = pkgResourceDefaultOpts(opts)
var resource AwsTransitGatewayAttachment
err := ctx.RegisterResource("hcp:index/awsTransitGatewayAttachment:AwsTransitGatewayAttachment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAwsTransitGatewayAttachment gets an existing AwsTransitGatewayAttachment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAwsTransitGatewayAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AwsTransitGatewayAttachmentState, opts ...pulumi.ResourceOption) (*AwsTransitGatewayAttachment, error) {
var resource AwsTransitGatewayAttachment
err := ctx.ReadResource("hcp:index/awsTransitGatewayAttachment:AwsTransitGatewayAttachment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AwsTransitGatewayAttachment resources.
type awsTransitGatewayAttachmentState struct {
// The time that the transit gateway attachment was created.
CreatedAt *string `pulumi:"createdAt"`
// The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into `ACCEPTED` or `ACTIVE` state.
ExpiresAt *string `pulumi:"expiresAt"`
// The ID of the HashiCorp Virtual Network (HVN).
HvnId *string `pulumi:"hvnId"`
// The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
OrganizationId *string `pulumi:"organizationId"`
// The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
ProjectId *string `pulumi:"projectId"`
// The transit gateway attachment ID used by AWS.
ProviderTransitGatewayAttachmentId *string `pulumi:"providerTransitGatewayAttachmentId"`
// The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS.
// The Resource Share should be associated with the HCP AWS account principal (see
// [aws_ram_principal_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_principal_association))
// and the transit gateway resource (see
// [aws_ram_resource_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_resource_association))
ResourceShareArn *string `pulumi:"resourceShareArn"`
// A unique URL identifying the transit gateway attachment.
SelfLink *string `pulumi:"selfLink"`
// The state of the transit gateway attachment.
State *string `pulumi:"state"`
// The user-settable name of the transit gateway attachment in HCP.
TransitGatewayAttachmentId *string `pulumi:"transitGatewayAttachmentId"`
// The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
TransitGatewayId *string `pulumi:"transitGatewayId"`
}
type AwsTransitGatewayAttachmentState struct {
// The time that the transit gateway attachment was created.
CreatedAt pulumi.StringPtrInput
// The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into `ACCEPTED` or `ACTIVE` state.
ExpiresAt pulumi.StringPtrInput
// The ID of the HashiCorp Virtual Network (HVN).
HvnId pulumi.StringPtrInput
// The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
OrganizationId pulumi.StringPtrInput
// The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
ProjectId pulumi.StringPtrInput
// The transit gateway attachment ID used by AWS.
ProviderTransitGatewayAttachmentId pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS.
// The Resource Share should be associated with the HCP AWS account principal (see
// [aws_ram_principal_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_principal_association))
// and the transit gateway resource (see
// [aws_ram_resource_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_resource_association))
ResourceShareArn pulumi.StringPtrInput
// A unique URL identifying the transit gateway attachment.
SelfLink pulumi.StringPtrInput
// The state of the transit gateway attachment.
State pulumi.StringPtrInput
// The user-settable name of the transit gateway attachment in HCP.
TransitGatewayAttachmentId pulumi.StringPtrInput
// The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
TransitGatewayId pulumi.StringPtrInput
}
func (AwsTransitGatewayAttachmentState) ElementType() reflect.Type {
return reflect.TypeOf((*awsTransitGatewayAttachmentState)(nil)).Elem()
}
type awsTransitGatewayAttachmentArgs struct {
// The ID of the HashiCorp Virtual Network (HVN).
HvnId string `pulumi:"hvnId"`
// The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS.
// The Resource Share should be associated with the HCP AWS account principal (see
// [aws_ram_principal_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_principal_association))
// and the transit gateway resource (see
// [aws_ram_resource_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_resource_association))
ResourceShareArn string `pulumi:"resourceShareArn"`
// The user-settable name of the transit gateway attachment in HCP.
TransitGatewayAttachmentId string `pulumi:"transitGatewayAttachmentId"`
// The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
TransitGatewayId string `pulumi:"transitGatewayId"`
}
// The set of arguments for constructing a AwsTransitGatewayAttachment resource.
type AwsTransitGatewayAttachmentArgs struct {
// The ID of the HashiCorp Virtual Network (HVN).
HvnId pulumi.StringInput
// The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS.
// The Resource Share should be associated with the HCP AWS account principal (see
// [aws_ram_principal_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_principal_association))
// and the transit gateway resource (see
// [aws_ram_resource_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_resource_association))
ResourceShareArn pulumi.StringInput
// The user-settable name of the transit gateway attachment in HCP.
TransitGatewayAttachmentId pulumi.StringInput
// The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
TransitGatewayId pulumi.StringInput
}
func (AwsTransitGatewayAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*awsTransitGatewayAttachmentArgs)(nil)).Elem()
}
type AwsTransitGatewayAttachmentInput interface {
pulumi.Input
ToAwsTransitGatewayAttachmentOutput() AwsTransitGatewayAttachmentOutput
ToAwsTransitGatewayAttachmentOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentOutput
}
func (*AwsTransitGatewayAttachment) ElementType() reflect.Type {
return reflect.TypeOf((**AwsTransitGatewayAttachment)(nil)).Elem()
}
func (i *AwsTransitGatewayAttachment) ToAwsTransitGatewayAttachmentOutput() AwsTransitGatewayAttachmentOutput {
return i.ToAwsTransitGatewayAttachmentOutputWithContext(context.Background())
}
func (i *AwsTransitGatewayAttachment) ToAwsTransitGatewayAttachmentOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(AwsTransitGatewayAttachmentOutput)
}
// AwsTransitGatewayAttachmentArrayInput is an input type that accepts AwsTransitGatewayAttachmentArray and AwsTransitGatewayAttachmentArrayOutput values.
// You can construct a concrete instance of `AwsTransitGatewayAttachmentArrayInput` via:
//
// AwsTransitGatewayAttachmentArray{ AwsTransitGatewayAttachmentArgs{...} }
type AwsTransitGatewayAttachmentArrayInput interface {
pulumi.Input
ToAwsTransitGatewayAttachmentArrayOutput() AwsTransitGatewayAttachmentArrayOutput
ToAwsTransitGatewayAttachmentArrayOutputWithContext(context.Context) AwsTransitGatewayAttachmentArrayOutput
}
type AwsTransitGatewayAttachmentArray []AwsTransitGatewayAttachmentInput
func (AwsTransitGatewayAttachmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AwsTransitGatewayAttachment)(nil)).Elem()
}
func (i AwsTransitGatewayAttachmentArray) ToAwsTransitGatewayAttachmentArrayOutput() AwsTransitGatewayAttachmentArrayOutput {
return i.ToAwsTransitGatewayAttachmentArrayOutputWithContext(context.Background())
}
func (i AwsTransitGatewayAttachmentArray) ToAwsTransitGatewayAttachmentArrayOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AwsTransitGatewayAttachmentArrayOutput)
}
// AwsTransitGatewayAttachmentMapInput is an input type that accepts AwsTransitGatewayAttachmentMap and AwsTransitGatewayAttachmentMapOutput values.
// You can construct a concrete instance of `AwsTransitGatewayAttachmentMapInput` via:
//
// AwsTransitGatewayAttachmentMap{ "key": AwsTransitGatewayAttachmentArgs{...} }
type AwsTransitGatewayAttachmentMapInput interface {
pulumi.Input
ToAwsTransitGatewayAttachmentMapOutput() AwsTransitGatewayAttachmentMapOutput
ToAwsTransitGatewayAttachmentMapOutputWithContext(context.Context) AwsTransitGatewayAttachmentMapOutput
}
type AwsTransitGatewayAttachmentMap map[string]AwsTransitGatewayAttachmentInput
func (AwsTransitGatewayAttachmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AwsTransitGatewayAttachment)(nil)).Elem()
}
func (i AwsTransitGatewayAttachmentMap) ToAwsTransitGatewayAttachmentMapOutput() AwsTransitGatewayAttachmentMapOutput {
return i.ToAwsTransitGatewayAttachmentMapOutputWithContext(context.Background())
}
func (i AwsTransitGatewayAttachmentMap) ToAwsTransitGatewayAttachmentMapOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AwsTransitGatewayAttachmentMapOutput)
}
type AwsTransitGatewayAttachmentOutput struct{ *pulumi.OutputState }
func (AwsTransitGatewayAttachmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AwsTransitGatewayAttachment)(nil)).Elem()
}
func (o AwsTransitGatewayAttachmentOutput) ToAwsTransitGatewayAttachmentOutput() AwsTransitGatewayAttachmentOutput {
return o
}
func (o AwsTransitGatewayAttachmentOutput) ToAwsTransitGatewayAttachmentOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentOutput {
return o
}
// The time that the transit gateway attachment was created.
func (o AwsTransitGatewayAttachmentOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into `ACCEPTED` or `ACTIVE` state.
func (o AwsTransitGatewayAttachmentOutput) ExpiresAt() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.ExpiresAt }).(pulumi.StringOutput)
}
// The ID of the HashiCorp Virtual Network (HVN).
func (o AwsTransitGatewayAttachmentOutput) HvnId() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.HvnId }).(pulumi.StringOutput)
}
// The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
func (o AwsTransitGatewayAttachmentOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
func (o AwsTransitGatewayAttachmentOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.ProjectId }).(pulumi.StringOutput)
}
// The transit gateway attachment ID used by AWS.
func (o AwsTransitGatewayAttachmentOutput) ProviderTransitGatewayAttachmentId() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.ProviderTransitGatewayAttachmentId }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS.
// The Resource Share should be associated with the HCP AWS account principal (see
// [aws_ram_principal_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_principal_association))
// and the transit gateway resource (see
// [aws_ram_resource_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ram_resource_association))
func (o AwsTransitGatewayAttachmentOutput) ResourceShareArn() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.ResourceShareArn }).(pulumi.StringOutput)
}
// A unique URL identifying the transit gateway attachment.
func (o AwsTransitGatewayAttachmentOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// The state of the transit gateway attachment.
func (o AwsTransitGatewayAttachmentOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// The user-settable name of the transit gateway attachment in HCP.
func (o AwsTransitGatewayAttachmentOutput) TransitGatewayAttachmentId() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.TransitGatewayAttachmentId }).(pulumi.StringOutput)
}
// The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
func (o AwsTransitGatewayAttachmentOutput) TransitGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *AwsTransitGatewayAttachment) pulumi.StringOutput { return v.TransitGatewayId }).(pulumi.StringOutput)
}
type AwsTransitGatewayAttachmentArrayOutput struct{ *pulumi.OutputState }
func (AwsTransitGatewayAttachmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AwsTransitGatewayAttachment)(nil)).Elem()
}
func (o AwsTransitGatewayAttachmentArrayOutput) ToAwsTransitGatewayAttachmentArrayOutput() AwsTransitGatewayAttachmentArrayOutput {
return o
}
func (o AwsTransitGatewayAttachmentArrayOutput) ToAwsTransitGatewayAttachmentArrayOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentArrayOutput {
return o
}
func (o AwsTransitGatewayAttachmentArrayOutput) Index(i pulumi.IntInput) AwsTransitGatewayAttachmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AwsTransitGatewayAttachment {
return vs[0].([]*AwsTransitGatewayAttachment)[vs[1].(int)]
}).(AwsTransitGatewayAttachmentOutput)
}
type AwsTransitGatewayAttachmentMapOutput struct{ *pulumi.OutputState }
func (AwsTransitGatewayAttachmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AwsTransitGatewayAttachment)(nil)).Elem()
}
func (o AwsTransitGatewayAttachmentMapOutput) ToAwsTransitGatewayAttachmentMapOutput() AwsTransitGatewayAttachmentMapOutput {
return o
}
func (o AwsTransitGatewayAttachmentMapOutput) ToAwsTransitGatewayAttachmentMapOutputWithContext(ctx context.Context) AwsTransitGatewayAttachmentMapOutput {
return o
}
func (o AwsTransitGatewayAttachmentMapOutput) MapIndex(k pulumi.StringInput) AwsTransitGatewayAttachmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AwsTransitGatewayAttachment {
return vs[0].(map[string]*AwsTransitGatewayAttachment)[vs[1].(string)]
}).(AwsTransitGatewayAttachmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AwsTransitGatewayAttachmentInput)(nil)).Elem(), &AwsTransitGatewayAttachment{})
pulumi.RegisterInputType(reflect.TypeOf((*AwsTransitGatewayAttachmentArrayInput)(nil)).Elem(), AwsTransitGatewayAttachmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AwsTransitGatewayAttachmentMapInput)(nil)).Elem(), AwsTransitGatewayAttachmentMap{})
pulumi.RegisterOutputType(AwsTransitGatewayAttachmentOutput{})
pulumi.RegisterOutputType(AwsTransitGatewayAttachmentArrayOutput{})
pulumi.RegisterOutputType(AwsTransitGatewayAttachmentMapOutput{})
}