github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/natGateway.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ec2 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a resource to create a VPC NAT Gateway. 16 // 17 // ## Example Usage 18 // 19 // ### Public NAT 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := ec2.NewNatGateway(ctx, "example", &ec2.NatGatewayArgs{ 35 // AllocationId: pulumi.Any(exampleAwsEip.Id), 36 // SubnetId: pulumi.Any(exampleAwsSubnet.Id), 37 // Tags: pulumi.StringMap{ 38 // "Name": pulumi.String("gw NAT"), 39 // }, 40 // }, pulumi.DependsOn([]pulumi.Resource{ 41 // exampleAwsInternetGateway, 42 // })) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ### Public NAT with Secondary Private IP Addresses 54 // 55 // <!--Start PulumiCodeChooser --> 56 // ```go 57 // package main 58 // 59 // import ( 60 // 61 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 62 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 63 // 64 // ) 65 // 66 // func main() { 67 // pulumi.Run(func(ctx *pulumi.Context) error { 68 // _, err := ec2.NewNatGateway(ctx, "example", &ec2.NatGatewayArgs{ 69 // AllocationId: pulumi.Any(exampleAwsEip.Id), 70 // SubnetId: pulumi.Any(exampleAwsSubnet.Id), 71 // SecondaryAllocationIds: pulumi.StringArray{ 72 // secondary.Id, 73 // }, 74 // SecondaryPrivateIpAddresses: pulumi.StringArray{ 75 // pulumi.String("10.0.1.5"), 76 // }, 77 // }) 78 // if err != nil { 79 // return err 80 // } 81 // return nil 82 // }) 83 // } 84 // 85 // ``` 86 // <!--End PulumiCodeChooser --> 87 // 88 // ### Private NAT 89 // 90 // <!--Start PulumiCodeChooser --> 91 // ```go 92 // package main 93 // 94 // import ( 95 // 96 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 97 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 98 // 99 // ) 100 // 101 // func main() { 102 // pulumi.Run(func(ctx *pulumi.Context) error { 103 // _, err := ec2.NewNatGateway(ctx, "example", &ec2.NatGatewayArgs{ 104 // ConnectivityType: pulumi.String("private"), 105 // SubnetId: pulumi.Any(exampleAwsSubnet.Id), 106 // }) 107 // if err != nil { 108 // return err 109 // } 110 // return nil 111 // }) 112 // } 113 // 114 // ``` 115 // <!--End PulumiCodeChooser --> 116 // 117 // ### Private NAT with Secondary Private IP Addresses 118 // 119 // <!--Start PulumiCodeChooser --> 120 // ```go 121 // package main 122 // 123 // import ( 124 // 125 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 126 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 127 // 128 // ) 129 // 130 // func main() { 131 // pulumi.Run(func(ctx *pulumi.Context) error { 132 // _, err := ec2.NewNatGateway(ctx, "example", &ec2.NatGatewayArgs{ 133 // ConnectivityType: pulumi.String("private"), 134 // SubnetId: pulumi.Any(exampleAwsSubnet.Id), 135 // SecondaryPrivateIpAddressCount: pulumi.Int(7), 136 // }) 137 // if err != nil { 138 // return err 139 // } 140 // return nil 141 // }) 142 // } 143 // 144 // ``` 145 // <!--End PulumiCodeChooser --> 146 // 147 // ## Import 148 // 149 // Using `pulumi import`, import NAT Gateways using the `id`. For example: 150 // 151 // ```sh 152 // $ pulumi import aws:ec2/natGateway:NatGateway private_gw nat-05dba92075d71c408 153 // ``` 154 type NatGateway struct { 155 pulumi.CustomResourceState 156 157 // The Allocation ID of the Elastic IP address for the NAT Gateway. Required for `connectivityType` of `public`. 158 AllocationId pulumi.StringPtrOutput `pulumi:"allocationId"` 159 // The association ID of the Elastic IP address that's associated with the NAT Gateway. Only available when `connectivityType` is `public`. 160 AssociationId pulumi.StringOutput `pulumi:"associationId"` 161 // Connectivity type for the NAT Gateway. Valid values are `private` and `public`. Defaults to `public`. 162 ConnectivityType pulumi.StringPtrOutput `pulumi:"connectivityType"` 163 // The ID of the network interface associated with the NAT Gateway. 164 NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` 165 // The private IPv4 address to assign to the NAT Gateway. If you don't provide an address, a private IPv4 address will be automatically assigned. 166 PrivateIp pulumi.StringOutput `pulumi:"privateIp"` 167 // The Elastic IP address associated with the NAT Gateway. 168 PublicIp pulumi.StringOutput `pulumi:"publicIp"` 169 // A list of secondary allocation EIP IDs for this NAT Gateway. 170 SecondaryAllocationIds pulumi.StringArrayOutput `pulumi:"secondaryAllocationIds"` 171 // [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. 172 SecondaryPrivateIpAddressCount pulumi.IntOutput `pulumi:"secondaryPrivateIpAddressCount"` 173 // A list of secondary private IPv4 addresses to assign to the NAT Gateway. 174 SecondaryPrivateIpAddresses pulumi.StringArrayOutput `pulumi:"secondaryPrivateIpAddresses"` 175 // The Subnet ID of the subnet in which to place the NAT Gateway. 176 SubnetId pulumi.StringOutput `pulumi:"subnetId"` 177 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 178 Tags pulumi.StringMapOutput `pulumi:"tags"` 179 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 180 // 181 // Deprecated: Please use `tags` instead. 182 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 183 } 184 185 // NewNatGateway registers a new resource with the given unique name, arguments, and options. 186 func NewNatGateway(ctx *pulumi.Context, 187 name string, args *NatGatewayArgs, opts ...pulumi.ResourceOption) (*NatGateway, error) { 188 if args == nil { 189 return nil, errors.New("missing one or more required arguments") 190 } 191 192 if args.SubnetId == nil { 193 return nil, errors.New("invalid value for required argument 'SubnetId'") 194 } 195 opts = internal.PkgResourceDefaultOpts(opts) 196 var resource NatGateway 197 err := ctx.RegisterResource("aws:ec2/natGateway:NatGateway", name, args, &resource, opts...) 198 if err != nil { 199 return nil, err 200 } 201 return &resource, nil 202 } 203 204 // GetNatGateway gets an existing NatGateway resource's state with the given name, ID, and optional 205 // state properties that are used to uniquely qualify the lookup (nil if not required). 206 func GetNatGateway(ctx *pulumi.Context, 207 name string, id pulumi.IDInput, state *NatGatewayState, opts ...pulumi.ResourceOption) (*NatGateway, error) { 208 var resource NatGateway 209 err := ctx.ReadResource("aws:ec2/natGateway:NatGateway", name, id, state, &resource, opts...) 210 if err != nil { 211 return nil, err 212 } 213 return &resource, nil 214 } 215 216 // Input properties used for looking up and filtering NatGateway resources. 217 type natGatewayState struct { 218 // The Allocation ID of the Elastic IP address for the NAT Gateway. Required for `connectivityType` of `public`. 219 AllocationId *string `pulumi:"allocationId"` 220 // The association ID of the Elastic IP address that's associated with the NAT Gateway. Only available when `connectivityType` is `public`. 221 AssociationId *string `pulumi:"associationId"` 222 // Connectivity type for the NAT Gateway. Valid values are `private` and `public`. Defaults to `public`. 223 ConnectivityType *string `pulumi:"connectivityType"` 224 // The ID of the network interface associated with the NAT Gateway. 225 NetworkInterfaceId *string `pulumi:"networkInterfaceId"` 226 // The private IPv4 address to assign to the NAT Gateway. If you don't provide an address, a private IPv4 address will be automatically assigned. 227 PrivateIp *string `pulumi:"privateIp"` 228 // The Elastic IP address associated with the NAT Gateway. 229 PublicIp *string `pulumi:"publicIp"` 230 // A list of secondary allocation EIP IDs for this NAT Gateway. 231 SecondaryAllocationIds []string `pulumi:"secondaryAllocationIds"` 232 // [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. 233 SecondaryPrivateIpAddressCount *int `pulumi:"secondaryPrivateIpAddressCount"` 234 // A list of secondary private IPv4 addresses to assign to the NAT Gateway. 235 SecondaryPrivateIpAddresses []string `pulumi:"secondaryPrivateIpAddresses"` 236 // The Subnet ID of the subnet in which to place the NAT Gateway. 237 SubnetId *string `pulumi:"subnetId"` 238 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 239 Tags map[string]string `pulumi:"tags"` 240 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 241 // 242 // Deprecated: Please use `tags` instead. 243 TagsAll map[string]string `pulumi:"tagsAll"` 244 } 245 246 type NatGatewayState struct { 247 // The Allocation ID of the Elastic IP address for the NAT Gateway. Required for `connectivityType` of `public`. 248 AllocationId pulumi.StringPtrInput 249 // The association ID of the Elastic IP address that's associated with the NAT Gateway. Only available when `connectivityType` is `public`. 250 AssociationId pulumi.StringPtrInput 251 // Connectivity type for the NAT Gateway. Valid values are `private` and `public`. Defaults to `public`. 252 ConnectivityType pulumi.StringPtrInput 253 // The ID of the network interface associated with the NAT Gateway. 254 NetworkInterfaceId pulumi.StringPtrInput 255 // The private IPv4 address to assign to the NAT Gateway. If you don't provide an address, a private IPv4 address will be automatically assigned. 256 PrivateIp pulumi.StringPtrInput 257 // The Elastic IP address associated with the NAT Gateway. 258 PublicIp pulumi.StringPtrInput 259 // A list of secondary allocation EIP IDs for this NAT Gateway. 260 SecondaryAllocationIds pulumi.StringArrayInput 261 // [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. 262 SecondaryPrivateIpAddressCount pulumi.IntPtrInput 263 // A list of secondary private IPv4 addresses to assign to the NAT Gateway. 264 SecondaryPrivateIpAddresses pulumi.StringArrayInput 265 // The Subnet ID of the subnet in which to place the NAT Gateway. 266 SubnetId pulumi.StringPtrInput 267 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 268 Tags pulumi.StringMapInput 269 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 270 // 271 // Deprecated: Please use `tags` instead. 272 TagsAll pulumi.StringMapInput 273 } 274 275 func (NatGatewayState) ElementType() reflect.Type { 276 return reflect.TypeOf((*natGatewayState)(nil)).Elem() 277 } 278 279 type natGatewayArgs struct { 280 // The Allocation ID of the Elastic IP address for the NAT Gateway. Required for `connectivityType` of `public`. 281 AllocationId *string `pulumi:"allocationId"` 282 // Connectivity type for the NAT Gateway. Valid values are `private` and `public`. Defaults to `public`. 283 ConnectivityType *string `pulumi:"connectivityType"` 284 // The private IPv4 address to assign to the NAT Gateway. If you don't provide an address, a private IPv4 address will be automatically assigned. 285 PrivateIp *string `pulumi:"privateIp"` 286 // A list of secondary allocation EIP IDs for this NAT Gateway. 287 SecondaryAllocationIds []string `pulumi:"secondaryAllocationIds"` 288 // [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. 289 SecondaryPrivateIpAddressCount *int `pulumi:"secondaryPrivateIpAddressCount"` 290 // A list of secondary private IPv4 addresses to assign to the NAT Gateway. 291 SecondaryPrivateIpAddresses []string `pulumi:"secondaryPrivateIpAddresses"` 292 // The Subnet ID of the subnet in which to place the NAT Gateway. 293 SubnetId string `pulumi:"subnetId"` 294 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 295 Tags map[string]string `pulumi:"tags"` 296 } 297 298 // The set of arguments for constructing a NatGateway resource. 299 type NatGatewayArgs struct { 300 // The Allocation ID of the Elastic IP address for the NAT Gateway. Required for `connectivityType` of `public`. 301 AllocationId pulumi.StringPtrInput 302 // Connectivity type for the NAT Gateway. Valid values are `private` and `public`. Defaults to `public`. 303 ConnectivityType pulumi.StringPtrInput 304 // The private IPv4 address to assign to the NAT Gateway. If you don't provide an address, a private IPv4 address will be automatically assigned. 305 PrivateIp pulumi.StringPtrInput 306 // A list of secondary allocation EIP IDs for this NAT Gateway. 307 SecondaryAllocationIds pulumi.StringArrayInput 308 // [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. 309 SecondaryPrivateIpAddressCount pulumi.IntPtrInput 310 // A list of secondary private IPv4 addresses to assign to the NAT Gateway. 311 SecondaryPrivateIpAddresses pulumi.StringArrayInput 312 // The Subnet ID of the subnet in which to place the NAT Gateway. 313 SubnetId pulumi.StringInput 314 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 315 Tags pulumi.StringMapInput 316 } 317 318 func (NatGatewayArgs) ElementType() reflect.Type { 319 return reflect.TypeOf((*natGatewayArgs)(nil)).Elem() 320 } 321 322 type NatGatewayInput interface { 323 pulumi.Input 324 325 ToNatGatewayOutput() NatGatewayOutput 326 ToNatGatewayOutputWithContext(ctx context.Context) NatGatewayOutput 327 } 328 329 func (*NatGateway) ElementType() reflect.Type { 330 return reflect.TypeOf((**NatGateway)(nil)).Elem() 331 } 332 333 func (i *NatGateway) ToNatGatewayOutput() NatGatewayOutput { 334 return i.ToNatGatewayOutputWithContext(context.Background()) 335 } 336 337 func (i *NatGateway) ToNatGatewayOutputWithContext(ctx context.Context) NatGatewayOutput { 338 return pulumi.ToOutputWithContext(ctx, i).(NatGatewayOutput) 339 } 340 341 // NatGatewayArrayInput is an input type that accepts NatGatewayArray and NatGatewayArrayOutput values. 342 // You can construct a concrete instance of `NatGatewayArrayInput` via: 343 // 344 // NatGatewayArray{ NatGatewayArgs{...} } 345 type NatGatewayArrayInput interface { 346 pulumi.Input 347 348 ToNatGatewayArrayOutput() NatGatewayArrayOutput 349 ToNatGatewayArrayOutputWithContext(context.Context) NatGatewayArrayOutput 350 } 351 352 type NatGatewayArray []NatGatewayInput 353 354 func (NatGatewayArray) ElementType() reflect.Type { 355 return reflect.TypeOf((*[]*NatGateway)(nil)).Elem() 356 } 357 358 func (i NatGatewayArray) ToNatGatewayArrayOutput() NatGatewayArrayOutput { 359 return i.ToNatGatewayArrayOutputWithContext(context.Background()) 360 } 361 362 func (i NatGatewayArray) ToNatGatewayArrayOutputWithContext(ctx context.Context) NatGatewayArrayOutput { 363 return pulumi.ToOutputWithContext(ctx, i).(NatGatewayArrayOutput) 364 } 365 366 // NatGatewayMapInput is an input type that accepts NatGatewayMap and NatGatewayMapOutput values. 367 // You can construct a concrete instance of `NatGatewayMapInput` via: 368 // 369 // NatGatewayMap{ "key": NatGatewayArgs{...} } 370 type NatGatewayMapInput interface { 371 pulumi.Input 372 373 ToNatGatewayMapOutput() NatGatewayMapOutput 374 ToNatGatewayMapOutputWithContext(context.Context) NatGatewayMapOutput 375 } 376 377 type NatGatewayMap map[string]NatGatewayInput 378 379 func (NatGatewayMap) ElementType() reflect.Type { 380 return reflect.TypeOf((*map[string]*NatGateway)(nil)).Elem() 381 } 382 383 func (i NatGatewayMap) ToNatGatewayMapOutput() NatGatewayMapOutput { 384 return i.ToNatGatewayMapOutputWithContext(context.Background()) 385 } 386 387 func (i NatGatewayMap) ToNatGatewayMapOutputWithContext(ctx context.Context) NatGatewayMapOutput { 388 return pulumi.ToOutputWithContext(ctx, i).(NatGatewayMapOutput) 389 } 390 391 type NatGatewayOutput struct{ *pulumi.OutputState } 392 393 func (NatGatewayOutput) ElementType() reflect.Type { 394 return reflect.TypeOf((**NatGateway)(nil)).Elem() 395 } 396 397 func (o NatGatewayOutput) ToNatGatewayOutput() NatGatewayOutput { 398 return o 399 } 400 401 func (o NatGatewayOutput) ToNatGatewayOutputWithContext(ctx context.Context) NatGatewayOutput { 402 return o 403 } 404 405 // The Allocation ID of the Elastic IP address for the NAT Gateway. Required for `connectivityType` of `public`. 406 func (o NatGatewayOutput) AllocationId() pulumi.StringPtrOutput { 407 return o.ApplyT(func(v *NatGateway) pulumi.StringPtrOutput { return v.AllocationId }).(pulumi.StringPtrOutput) 408 } 409 410 // The association ID of the Elastic IP address that's associated with the NAT Gateway. Only available when `connectivityType` is `public`. 411 func (o NatGatewayOutput) AssociationId() pulumi.StringOutput { 412 return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.AssociationId }).(pulumi.StringOutput) 413 } 414 415 // Connectivity type for the NAT Gateway. Valid values are `private` and `public`. Defaults to `public`. 416 func (o NatGatewayOutput) ConnectivityType() pulumi.StringPtrOutput { 417 return o.ApplyT(func(v *NatGateway) pulumi.StringPtrOutput { return v.ConnectivityType }).(pulumi.StringPtrOutput) 418 } 419 420 // The ID of the network interface associated with the NAT Gateway. 421 func (o NatGatewayOutput) NetworkInterfaceId() pulumi.StringOutput { 422 return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) 423 } 424 425 // The private IPv4 address to assign to the NAT Gateway. If you don't provide an address, a private IPv4 address will be automatically assigned. 426 func (o NatGatewayOutput) PrivateIp() pulumi.StringOutput { 427 return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.PrivateIp }).(pulumi.StringOutput) 428 } 429 430 // The Elastic IP address associated with the NAT Gateway. 431 func (o NatGatewayOutput) PublicIp() pulumi.StringOutput { 432 return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.PublicIp }).(pulumi.StringOutput) 433 } 434 435 // A list of secondary allocation EIP IDs for this NAT Gateway. 436 func (o NatGatewayOutput) SecondaryAllocationIds() pulumi.StringArrayOutput { 437 return o.ApplyT(func(v *NatGateway) pulumi.StringArrayOutput { return v.SecondaryAllocationIds }).(pulumi.StringArrayOutput) 438 } 439 440 // [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. 441 func (o NatGatewayOutput) SecondaryPrivateIpAddressCount() pulumi.IntOutput { 442 return o.ApplyT(func(v *NatGateway) pulumi.IntOutput { return v.SecondaryPrivateIpAddressCount }).(pulumi.IntOutput) 443 } 444 445 // A list of secondary private IPv4 addresses to assign to the NAT Gateway. 446 func (o NatGatewayOutput) SecondaryPrivateIpAddresses() pulumi.StringArrayOutput { 447 return o.ApplyT(func(v *NatGateway) pulumi.StringArrayOutput { return v.SecondaryPrivateIpAddresses }).(pulumi.StringArrayOutput) 448 } 449 450 // The Subnet ID of the subnet in which to place the NAT Gateway. 451 func (o NatGatewayOutput) SubnetId() pulumi.StringOutput { 452 return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) 453 } 454 455 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 456 func (o NatGatewayOutput) Tags() pulumi.StringMapOutput { 457 return o.ApplyT(func(v *NatGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 458 } 459 460 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 461 // 462 // Deprecated: Please use `tags` instead. 463 func (o NatGatewayOutput) TagsAll() pulumi.StringMapOutput { 464 return o.ApplyT(func(v *NatGateway) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 465 } 466 467 type NatGatewayArrayOutput struct{ *pulumi.OutputState } 468 469 func (NatGatewayArrayOutput) ElementType() reflect.Type { 470 return reflect.TypeOf((*[]*NatGateway)(nil)).Elem() 471 } 472 473 func (o NatGatewayArrayOutput) ToNatGatewayArrayOutput() NatGatewayArrayOutput { 474 return o 475 } 476 477 func (o NatGatewayArrayOutput) ToNatGatewayArrayOutputWithContext(ctx context.Context) NatGatewayArrayOutput { 478 return o 479 } 480 481 func (o NatGatewayArrayOutput) Index(i pulumi.IntInput) NatGatewayOutput { 482 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NatGateway { 483 return vs[0].([]*NatGateway)[vs[1].(int)] 484 }).(NatGatewayOutput) 485 } 486 487 type NatGatewayMapOutput struct{ *pulumi.OutputState } 488 489 func (NatGatewayMapOutput) ElementType() reflect.Type { 490 return reflect.TypeOf((*map[string]*NatGateway)(nil)).Elem() 491 } 492 493 func (o NatGatewayMapOutput) ToNatGatewayMapOutput() NatGatewayMapOutput { 494 return o 495 } 496 497 func (o NatGatewayMapOutput) ToNatGatewayMapOutputWithContext(ctx context.Context) NatGatewayMapOutput { 498 return o 499 } 500 501 func (o NatGatewayMapOutput) MapIndex(k pulumi.StringInput) NatGatewayOutput { 502 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NatGateway { 503 return vs[0].(map[string]*NatGateway)[vs[1].(string)] 504 }).(NatGatewayOutput) 505 } 506 507 func init() { 508 pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayInput)(nil)).Elem(), &NatGateway{}) 509 pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayArrayInput)(nil)).Elem(), NatGatewayArray{}) 510 pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayMapInput)(nil)).Elem(), NatGatewayMap{}) 511 pulumi.RegisterOutputType(NatGatewayOutput{}) 512 pulumi.RegisterOutputType(NatGatewayArrayOutput{}) 513 pulumi.RegisterOutputType(NatGatewayMapOutput{}) 514 }