-
Notifications
You must be signed in to change notification settings - Fork 151
/
localGatewayRouteTableVpcAssociation.go
354 lines (293 loc) · 17 KB
/
localGatewayRouteTableVpcAssociation.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
// *** 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 (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EC2 Local Gateway Route Table VPC Association. More information can be found in the [Outposts User Guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-local-gateways.html#vpc-associations).
//
// ## 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 {
// opt0 := "arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef"
// exampleLocalGatewayRouteTable, err := ec2.GetLocalGatewayRouteTable(ctx, &ec2.GetLocalGatewayRouteTableArgs{
// OutpostArn: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// exampleVpc, err := ec2.NewVpc(ctx, "exampleVpc", &ec2.VpcArgs{
// CidrBlock: pulumi.String("10.0.0.0/16"),
// })
// if err != nil {
// return err
// }
// _, err = ec2.NewLocalGatewayRouteTableVpcAssociation(ctx, "exampleLocalGatewayRouteTableVpcAssociation", &ec2.LocalGatewayRouteTableVpcAssociationArgs{
// LocalGatewayRouteTableId: pulumi.String(exampleLocalGatewayRouteTable.Id),
// VpcId: exampleVpc.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// `aws_ec2_local_gateway_route_table_vpc_association` can be imported by using the Local Gateway Route Table VPC Association identifier, e.g.,
//
// ```sh
// $ pulumi import aws:ec2/localGatewayRouteTableVpcAssociation:LocalGatewayRouteTableVpcAssociation example lgw-vpc-assoc-1234567890abcdef
// ```
type LocalGatewayRouteTableVpcAssociation struct {
pulumi.CustomResourceState
LocalGatewayId pulumi.StringOutput `pulumi:"localGatewayId"`
// Identifier of EC2 Local Gateway Route Table.
LocalGatewayRouteTableId pulumi.StringOutput `pulumi:"localGatewayRouteTableId"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// Identifier of EC2 VPC.
VpcId pulumi.StringOutput `pulumi:"vpcId"`
}
// NewLocalGatewayRouteTableVpcAssociation registers a new resource with the given unique name, arguments, and options.
func NewLocalGatewayRouteTableVpcAssociation(ctx *pulumi.Context,
name string, args *LocalGatewayRouteTableVpcAssociationArgs, opts ...pulumi.ResourceOption) (*LocalGatewayRouteTableVpcAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LocalGatewayRouteTableId == nil {
return nil, errors.New("invalid value for required argument 'LocalGatewayRouteTableId'")
}
if args.VpcId == nil {
return nil, errors.New("invalid value for required argument 'VpcId'")
}
var resource LocalGatewayRouteTableVpcAssociation
err := ctx.RegisterResource("aws:ec2/localGatewayRouteTableVpcAssociation:LocalGatewayRouteTableVpcAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalGatewayRouteTableVpcAssociation gets an existing LocalGatewayRouteTableVpcAssociation 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 GetLocalGatewayRouteTableVpcAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalGatewayRouteTableVpcAssociationState, opts ...pulumi.ResourceOption) (*LocalGatewayRouteTableVpcAssociation, error) {
var resource LocalGatewayRouteTableVpcAssociation
err := ctx.ReadResource("aws:ec2/localGatewayRouteTableVpcAssociation:LocalGatewayRouteTableVpcAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalGatewayRouteTableVpcAssociation resources.
type localGatewayRouteTableVpcAssociationState struct {
LocalGatewayId *string `pulumi:"localGatewayId"`
// Identifier of EC2 Local Gateway Route Table.
LocalGatewayRouteTableId *string `pulumi:"localGatewayRouteTableId"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll map[string]string `pulumi:"tagsAll"`
// Identifier of EC2 VPC.
VpcId *string `pulumi:"vpcId"`
}
type LocalGatewayRouteTableVpcAssociationState struct {
LocalGatewayId pulumi.StringPtrInput
// Identifier of EC2 Local Gateway Route Table.
LocalGatewayRouteTableId pulumi.StringPtrInput
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
// Identifier of EC2 VPC.
VpcId pulumi.StringPtrInput
}
func (LocalGatewayRouteTableVpcAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*localGatewayRouteTableVpcAssociationState)(nil)).Elem()
}
type localGatewayRouteTableVpcAssociationArgs struct {
// Identifier of EC2 Local Gateway Route Table.
LocalGatewayRouteTableId string `pulumi:"localGatewayRouteTableId"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// Identifier of EC2 VPC.
VpcId string `pulumi:"vpcId"`
}
// The set of arguments for constructing a LocalGatewayRouteTableVpcAssociation resource.
type LocalGatewayRouteTableVpcAssociationArgs struct {
// Identifier of EC2 Local Gateway Route Table.
LocalGatewayRouteTableId pulumi.StringInput
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// Identifier of EC2 VPC.
VpcId pulumi.StringInput
}
func (LocalGatewayRouteTableVpcAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localGatewayRouteTableVpcAssociationArgs)(nil)).Elem()
}
type LocalGatewayRouteTableVpcAssociationInput interface {
pulumi.Input
ToLocalGatewayRouteTableVpcAssociationOutput() LocalGatewayRouteTableVpcAssociationOutput
ToLocalGatewayRouteTableVpcAssociationOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationOutput
}
func (*LocalGatewayRouteTableVpcAssociation) ElementType() reflect.Type {
return reflect.TypeOf((*LocalGatewayRouteTableVpcAssociation)(nil))
}
func (i *LocalGatewayRouteTableVpcAssociation) ToLocalGatewayRouteTableVpcAssociationOutput() LocalGatewayRouteTableVpcAssociationOutput {
return i.ToLocalGatewayRouteTableVpcAssociationOutputWithContext(context.Background())
}
func (i *LocalGatewayRouteTableVpcAssociation) ToLocalGatewayRouteTableVpcAssociationOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalGatewayRouteTableVpcAssociationOutput)
}
func (i *LocalGatewayRouteTableVpcAssociation) ToLocalGatewayRouteTableVpcAssociationPtrOutput() LocalGatewayRouteTableVpcAssociationPtrOutput {
return i.ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(context.Background())
}
func (i *LocalGatewayRouteTableVpcAssociation) ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalGatewayRouteTableVpcAssociationPtrOutput)
}
type LocalGatewayRouteTableVpcAssociationPtrInput interface {
pulumi.Input
ToLocalGatewayRouteTableVpcAssociationPtrOutput() LocalGatewayRouteTableVpcAssociationPtrOutput
ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationPtrOutput
}
type localGatewayRouteTableVpcAssociationPtrType LocalGatewayRouteTableVpcAssociationArgs
func (*localGatewayRouteTableVpcAssociationPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**LocalGatewayRouteTableVpcAssociation)(nil))
}
func (i *localGatewayRouteTableVpcAssociationPtrType) ToLocalGatewayRouteTableVpcAssociationPtrOutput() LocalGatewayRouteTableVpcAssociationPtrOutput {
return i.ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(context.Background())
}
func (i *localGatewayRouteTableVpcAssociationPtrType) ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalGatewayRouteTableVpcAssociationPtrOutput)
}
// LocalGatewayRouteTableVpcAssociationArrayInput is an input type that accepts LocalGatewayRouteTableVpcAssociationArray and LocalGatewayRouteTableVpcAssociationArrayOutput values.
// You can construct a concrete instance of `LocalGatewayRouteTableVpcAssociationArrayInput` via:
//
// LocalGatewayRouteTableVpcAssociationArray{ LocalGatewayRouteTableVpcAssociationArgs{...} }
type LocalGatewayRouteTableVpcAssociationArrayInput interface {
pulumi.Input
ToLocalGatewayRouteTableVpcAssociationArrayOutput() LocalGatewayRouteTableVpcAssociationArrayOutput
ToLocalGatewayRouteTableVpcAssociationArrayOutputWithContext(context.Context) LocalGatewayRouteTableVpcAssociationArrayOutput
}
type LocalGatewayRouteTableVpcAssociationArray []LocalGatewayRouteTableVpcAssociationInput
func (LocalGatewayRouteTableVpcAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalGatewayRouteTableVpcAssociation)(nil)).Elem()
}
func (i LocalGatewayRouteTableVpcAssociationArray) ToLocalGatewayRouteTableVpcAssociationArrayOutput() LocalGatewayRouteTableVpcAssociationArrayOutput {
return i.ToLocalGatewayRouteTableVpcAssociationArrayOutputWithContext(context.Background())
}
func (i LocalGatewayRouteTableVpcAssociationArray) ToLocalGatewayRouteTableVpcAssociationArrayOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalGatewayRouteTableVpcAssociationArrayOutput)
}
// LocalGatewayRouteTableVpcAssociationMapInput is an input type that accepts LocalGatewayRouteTableVpcAssociationMap and LocalGatewayRouteTableVpcAssociationMapOutput values.
// You can construct a concrete instance of `LocalGatewayRouteTableVpcAssociationMapInput` via:
//
// LocalGatewayRouteTableVpcAssociationMap{ "key": LocalGatewayRouteTableVpcAssociationArgs{...} }
type LocalGatewayRouteTableVpcAssociationMapInput interface {
pulumi.Input
ToLocalGatewayRouteTableVpcAssociationMapOutput() LocalGatewayRouteTableVpcAssociationMapOutput
ToLocalGatewayRouteTableVpcAssociationMapOutputWithContext(context.Context) LocalGatewayRouteTableVpcAssociationMapOutput
}
type LocalGatewayRouteTableVpcAssociationMap map[string]LocalGatewayRouteTableVpcAssociationInput
func (LocalGatewayRouteTableVpcAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalGatewayRouteTableVpcAssociation)(nil)).Elem()
}
func (i LocalGatewayRouteTableVpcAssociationMap) ToLocalGatewayRouteTableVpcAssociationMapOutput() LocalGatewayRouteTableVpcAssociationMapOutput {
return i.ToLocalGatewayRouteTableVpcAssociationMapOutputWithContext(context.Background())
}
func (i LocalGatewayRouteTableVpcAssociationMap) ToLocalGatewayRouteTableVpcAssociationMapOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalGatewayRouteTableVpcAssociationMapOutput)
}
type LocalGatewayRouteTableVpcAssociationOutput struct{ *pulumi.OutputState }
func (LocalGatewayRouteTableVpcAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LocalGatewayRouteTableVpcAssociation)(nil))
}
func (o LocalGatewayRouteTableVpcAssociationOutput) ToLocalGatewayRouteTableVpcAssociationOutput() LocalGatewayRouteTableVpcAssociationOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationOutput) ToLocalGatewayRouteTableVpcAssociationOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationOutput) ToLocalGatewayRouteTableVpcAssociationPtrOutput() LocalGatewayRouteTableVpcAssociationPtrOutput {
return o.ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(context.Background())
}
func (o LocalGatewayRouteTableVpcAssociationOutput) ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v LocalGatewayRouteTableVpcAssociation) *LocalGatewayRouteTableVpcAssociation {
return &v
}).(LocalGatewayRouteTableVpcAssociationPtrOutput)
}
type LocalGatewayRouteTableVpcAssociationPtrOutput struct{ *pulumi.OutputState }
func (LocalGatewayRouteTableVpcAssociationPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalGatewayRouteTableVpcAssociation)(nil))
}
func (o LocalGatewayRouteTableVpcAssociationPtrOutput) ToLocalGatewayRouteTableVpcAssociationPtrOutput() LocalGatewayRouteTableVpcAssociationPtrOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationPtrOutput) ToLocalGatewayRouteTableVpcAssociationPtrOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationPtrOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationPtrOutput) Elem() LocalGatewayRouteTableVpcAssociationOutput {
return o.ApplyT(func(v *LocalGatewayRouteTableVpcAssociation) LocalGatewayRouteTableVpcAssociation {
if v != nil {
return *v
}
var ret LocalGatewayRouteTableVpcAssociation
return ret
}).(LocalGatewayRouteTableVpcAssociationOutput)
}
type LocalGatewayRouteTableVpcAssociationArrayOutput struct{ *pulumi.OutputState }
func (LocalGatewayRouteTableVpcAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]LocalGatewayRouteTableVpcAssociation)(nil))
}
func (o LocalGatewayRouteTableVpcAssociationArrayOutput) ToLocalGatewayRouteTableVpcAssociationArrayOutput() LocalGatewayRouteTableVpcAssociationArrayOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationArrayOutput) ToLocalGatewayRouteTableVpcAssociationArrayOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationArrayOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationArrayOutput) Index(i pulumi.IntInput) LocalGatewayRouteTableVpcAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) LocalGatewayRouteTableVpcAssociation {
return vs[0].([]LocalGatewayRouteTableVpcAssociation)[vs[1].(int)]
}).(LocalGatewayRouteTableVpcAssociationOutput)
}
type LocalGatewayRouteTableVpcAssociationMapOutput struct{ *pulumi.OutputState }
func (LocalGatewayRouteTableVpcAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]LocalGatewayRouteTableVpcAssociation)(nil))
}
func (o LocalGatewayRouteTableVpcAssociationMapOutput) ToLocalGatewayRouteTableVpcAssociationMapOutput() LocalGatewayRouteTableVpcAssociationMapOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationMapOutput) ToLocalGatewayRouteTableVpcAssociationMapOutputWithContext(ctx context.Context) LocalGatewayRouteTableVpcAssociationMapOutput {
return o
}
func (o LocalGatewayRouteTableVpcAssociationMapOutput) MapIndex(k pulumi.StringInput) LocalGatewayRouteTableVpcAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) LocalGatewayRouteTableVpcAssociation {
return vs[0].(map[string]LocalGatewayRouteTableVpcAssociation)[vs[1].(string)]
}).(LocalGatewayRouteTableVpcAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalGatewayRouteTableVpcAssociationInput)(nil)).Elem(), &LocalGatewayRouteTableVpcAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalGatewayRouteTableVpcAssociationPtrInput)(nil)).Elem(), &LocalGatewayRouteTableVpcAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalGatewayRouteTableVpcAssociationArrayInput)(nil)).Elem(), LocalGatewayRouteTableVpcAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalGatewayRouteTableVpcAssociationMapInput)(nil)).Elem(), LocalGatewayRouteTableVpcAssociationMap{})
pulumi.RegisterOutputType(LocalGatewayRouteTableVpcAssociationOutput{})
pulumi.RegisterOutputType(LocalGatewayRouteTableVpcAssociationPtrOutput{})
pulumi.RegisterOutputType(LocalGatewayRouteTableVpcAssociationArrayOutput{})
pulumi.RegisterOutputType(LocalGatewayRouteTableVpcAssociationMapOutput{})
}