github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/eip.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 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides an Elastic IP resource. 15 // 16 // > **Note:** EIP may require IGW to exist prior to association. Use `dependsOn` to set an explicit dependency on the IGW. 17 // 18 // > **Note:** Do not use `networkInterface` to associate the EIP to `lb.LoadBalancer` or `ec2.NatGateway` resources. Instead use the `allocationId` available in those resources to allow AWS to manage the association, otherwise you will see `AuthFailure` errors. 19 // 20 // ## Example Usage 21 // 22 // ### Single EIP associated with an instance 23 // 24 // <!--Start PulumiCodeChooser --> 25 // ```go 26 // package main 27 // 28 // import ( 29 // 30 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 31 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 32 // 33 // ) 34 // 35 // func main() { 36 // pulumi.Run(func(ctx *pulumi.Context) error { 37 // _, err := ec2.NewEip(ctx, "lb", &ec2.EipArgs{ 38 // Instance: pulumi.Any(web.Id), 39 // Domain: pulumi.String("vpc"), 40 // }) 41 // if err != nil { 42 // return err 43 // } 44 // return nil 45 // }) 46 // } 47 // 48 // ``` 49 // <!--End PulumiCodeChooser --> 50 // 51 // ### Multiple EIPs associated with a single network interface 52 // 53 // <!--Start PulumiCodeChooser --> 54 // ```go 55 // package main 56 // 57 // import ( 58 // 59 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 60 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 61 // 62 // ) 63 // 64 // func main() { 65 // pulumi.Run(func(ctx *pulumi.Context) error { 66 // _, err := ec2.NewNetworkInterface(ctx, "multi-ip", &ec2.NetworkInterfaceArgs{ 67 // SubnetId: pulumi.Any(main.Id), 68 // PrivateIps: pulumi.StringArray{ 69 // pulumi.String("10.0.0.10"), 70 // pulumi.String("10.0.0.11"), 71 // }, 72 // }) 73 // if err != nil { 74 // return err 75 // } 76 // _, err = ec2.NewEip(ctx, "one", &ec2.EipArgs{ 77 // Domain: pulumi.String("vpc"), 78 // NetworkInterface: multi_ip.ID(), 79 // AssociateWithPrivateIp: pulumi.String("10.0.0.10"), 80 // }) 81 // if err != nil { 82 // return err 83 // } 84 // _, err = ec2.NewEip(ctx, "two", &ec2.EipArgs{ 85 // Domain: pulumi.String("vpc"), 86 // NetworkInterface: multi_ip.ID(), 87 // AssociateWithPrivateIp: pulumi.String("10.0.0.11"), 88 // }) 89 // if err != nil { 90 // return err 91 // } 92 // return nil 93 // }) 94 // } 95 // 96 // ``` 97 // <!--End PulumiCodeChooser --> 98 // 99 // ### Attaching an EIP to an Instance with a pre-assigned private ip (VPC Only) 100 // 101 // <!--Start PulumiCodeChooser --> 102 // ```go 103 // package main 104 // 105 // import ( 106 // 107 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 108 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 109 // 110 // ) 111 // 112 // func main() { 113 // pulumi.Run(func(ctx *pulumi.Context) error { 114 // _, err := ec2.NewVpc(ctx, "default", &ec2.VpcArgs{ 115 // CidrBlock: pulumi.String("10.0.0.0/16"), 116 // EnableDnsHostnames: pulumi.Bool(true), 117 // }) 118 // if err != nil { 119 // return err 120 // } 121 // gw, err := ec2.NewInternetGateway(ctx, "gw", &ec2.InternetGatewayArgs{ 122 // VpcId: _default.ID(), 123 // }) 124 // if err != nil { 125 // return err 126 // } 127 // myTestSubnet, err := ec2.NewSubnet(ctx, "my_test_subnet", &ec2.SubnetArgs{ 128 // VpcId: _default.ID(), 129 // CidrBlock: pulumi.String("10.0.0.0/24"), 130 // MapPublicIpOnLaunch: pulumi.Bool(true), 131 // }, pulumi.DependsOn([]pulumi.Resource{ 132 // gw, 133 // })) 134 // if err != nil { 135 // return err 136 // } 137 // foo, err := ec2.NewInstance(ctx, "foo", &ec2.InstanceArgs{ 138 // Ami: pulumi.String("ami-5189a661"), 139 // InstanceType: pulumi.String(ec2.InstanceType_T2_Micro), 140 // PrivateIp: pulumi.String("10.0.0.12"), 141 // SubnetId: myTestSubnet.ID(), 142 // }) 143 // if err != nil { 144 // return err 145 // } 146 // _, err = ec2.NewEip(ctx, "bar", &ec2.EipArgs{ 147 // Domain: pulumi.String("vpc"), 148 // Instance: foo.ID(), 149 // AssociateWithPrivateIp: pulumi.String("10.0.0.12"), 150 // }, pulumi.DependsOn([]pulumi.Resource{ 151 // gw, 152 // })) 153 // if err != nil { 154 // return err 155 // } 156 // return nil 157 // }) 158 // } 159 // 160 // ``` 161 // <!--End PulumiCodeChooser --> 162 // 163 // ### Allocating EIP from the BYOIP pool 164 // 165 // <!--Start PulumiCodeChooser --> 166 // ```go 167 // package main 168 // 169 // import ( 170 // 171 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 172 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 173 // 174 // ) 175 // 176 // func main() { 177 // pulumi.Run(func(ctx *pulumi.Context) error { 178 // _, err := ec2.NewEip(ctx, "byoip-ip", &ec2.EipArgs{ 179 // Domain: pulumi.String("vpc"), 180 // PublicIpv4Pool: pulumi.String("ipv4pool-ec2-012345"), 181 // }) 182 // if err != nil { 183 // return err 184 // } 185 // return nil 186 // }) 187 // } 188 // 189 // ``` 190 // <!--End PulumiCodeChooser --> 191 // 192 // ## Import 193 // 194 // Using `pulumi import`, import EIPs in a VPC using their Allocation ID. For example: 195 // 196 // ```sh 197 // $ pulumi import aws:ec2/eip:Eip bar eipalloc-00a10e96 198 // ``` 199 type Eip struct { 200 pulumi.CustomResourceState 201 202 // IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs. 203 Address pulumi.StringPtrOutput `pulumi:"address"` 204 // ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC. 205 AllocationId pulumi.StringOutput `pulumi:"allocationId"` 206 // User-specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address. 207 AssociateWithPrivateIp pulumi.StringPtrOutput `pulumi:"associateWithPrivateIp"` 208 // ID representing the association of the address with an instance in a VPC. 209 AssociationId pulumi.StringOutput `pulumi:"associationId"` 210 // Carrier IP address. 211 CarrierIp pulumi.StringOutput `pulumi:"carrierIp"` 212 // Customer owned IP. 213 CustomerOwnedIp pulumi.StringOutput `pulumi:"customerOwnedIp"` 214 // ID of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing). 215 CustomerOwnedIpv4Pool pulumi.StringPtrOutput `pulumi:"customerOwnedIpv4Pool"` 216 // Indicates if this EIP is for use in VPC (`vpc`). 217 Domain pulumi.StringOutput `pulumi:"domain"` 218 // EC2 instance ID. 219 Instance pulumi.StringOutput `pulumi:"instance"` 220 // Location from which the IP address is advertised. Use this parameter to limit the address to this location. 221 NetworkBorderGroup pulumi.StringOutput `pulumi:"networkBorderGroup"` 222 // Network interface ID to associate with. 223 NetworkInterface pulumi.StringOutput `pulumi:"networkInterface"` 224 // The Private DNS associated with the Elastic IP address (if in VPC). 225 PrivateDns pulumi.StringOutput `pulumi:"privateDns"` 226 // Contains the private IP address (if in VPC). 227 PrivateIp pulumi.StringOutput `pulumi:"privateIp"` 228 // The DNS pointer (PTR) record for the IP address. 229 PtrRecord pulumi.StringOutput `pulumi:"ptrRecord"` 230 // Public DNS associated with the Elastic IP address. 231 PublicDns pulumi.StringOutput `pulumi:"publicDns"` 232 // Contains the public IP address. 233 PublicIp pulumi.StringOutput `pulumi:"publicIp"` 234 // EC2 IPv4 address pool identifier or `amazon`. 235 // This option is only available for VPC EIPs. 236 PublicIpv4Pool pulumi.StringOutput `pulumi:"publicIpv4Pool"` 237 // Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 238 Tags pulumi.StringMapOutput `pulumi:"tags"` 239 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 240 // 241 // Deprecated: Please use `tags` instead. 242 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 243 // Boolean if the EIP is in a VPC or not. Use `domain` instead. 244 // Defaults to `true` unless the region supports EC2-Classic. 245 // 246 // > **NOTE:** You can specify either the `instance` ID or the `networkInterface` ID, but not both. Including both will **not** return an error from the AWS API, but will have undefined behavior. See the relevant [AssociateAddress API Call][1] for more information. 247 // 248 // > **NOTE:** Specifying both `publicIpv4Pool` and `address` won't cause an error but `address` will be used in the 249 // case both options are defined as the api only requires one or the other. 250 // 251 // Deprecated: use domain attribute instead 252 Vpc pulumi.BoolOutput `pulumi:"vpc"` 253 } 254 255 // NewEip registers a new resource with the given unique name, arguments, and options. 256 func NewEip(ctx *pulumi.Context, 257 name string, args *EipArgs, opts ...pulumi.ResourceOption) (*Eip, error) { 258 if args == nil { 259 args = &EipArgs{} 260 } 261 262 opts = internal.PkgResourceDefaultOpts(opts) 263 var resource Eip 264 err := ctx.RegisterResource("aws:ec2/eip:Eip", name, args, &resource, opts...) 265 if err != nil { 266 return nil, err 267 } 268 return &resource, nil 269 } 270 271 // GetEip gets an existing Eip resource's state with the given name, ID, and optional 272 // state properties that are used to uniquely qualify the lookup (nil if not required). 273 func GetEip(ctx *pulumi.Context, 274 name string, id pulumi.IDInput, state *EipState, opts ...pulumi.ResourceOption) (*Eip, error) { 275 var resource Eip 276 err := ctx.ReadResource("aws:ec2/eip:Eip", name, id, state, &resource, opts...) 277 if err != nil { 278 return nil, err 279 } 280 return &resource, nil 281 } 282 283 // Input properties used for looking up and filtering Eip resources. 284 type eipState struct { 285 // IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs. 286 Address *string `pulumi:"address"` 287 // ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC. 288 AllocationId *string `pulumi:"allocationId"` 289 // User-specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address. 290 AssociateWithPrivateIp *string `pulumi:"associateWithPrivateIp"` 291 // ID representing the association of the address with an instance in a VPC. 292 AssociationId *string `pulumi:"associationId"` 293 // Carrier IP address. 294 CarrierIp *string `pulumi:"carrierIp"` 295 // Customer owned IP. 296 CustomerOwnedIp *string `pulumi:"customerOwnedIp"` 297 // ID of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing). 298 CustomerOwnedIpv4Pool *string `pulumi:"customerOwnedIpv4Pool"` 299 // Indicates if this EIP is for use in VPC (`vpc`). 300 Domain *string `pulumi:"domain"` 301 // EC2 instance ID. 302 Instance *string `pulumi:"instance"` 303 // Location from which the IP address is advertised. Use this parameter to limit the address to this location. 304 NetworkBorderGroup *string `pulumi:"networkBorderGroup"` 305 // Network interface ID to associate with. 306 NetworkInterface *string `pulumi:"networkInterface"` 307 // The Private DNS associated with the Elastic IP address (if in VPC). 308 PrivateDns *string `pulumi:"privateDns"` 309 // Contains the private IP address (if in VPC). 310 PrivateIp *string `pulumi:"privateIp"` 311 // The DNS pointer (PTR) record for the IP address. 312 PtrRecord *string `pulumi:"ptrRecord"` 313 // Public DNS associated with the Elastic IP address. 314 PublicDns *string `pulumi:"publicDns"` 315 // Contains the public IP address. 316 PublicIp *string `pulumi:"publicIp"` 317 // EC2 IPv4 address pool identifier or `amazon`. 318 // This option is only available for VPC EIPs. 319 PublicIpv4Pool *string `pulumi:"publicIpv4Pool"` 320 // Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 321 Tags map[string]string `pulumi:"tags"` 322 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 323 // 324 // Deprecated: Please use `tags` instead. 325 TagsAll map[string]string `pulumi:"tagsAll"` 326 // Boolean if the EIP is in a VPC or not. Use `domain` instead. 327 // Defaults to `true` unless the region supports EC2-Classic. 328 // 329 // > **NOTE:** You can specify either the `instance` ID or the `networkInterface` ID, but not both. Including both will **not** return an error from the AWS API, but will have undefined behavior. See the relevant [AssociateAddress API Call][1] for more information. 330 // 331 // > **NOTE:** Specifying both `publicIpv4Pool` and `address` won't cause an error but `address` will be used in the 332 // case both options are defined as the api only requires one or the other. 333 // 334 // Deprecated: use domain attribute instead 335 Vpc *bool `pulumi:"vpc"` 336 } 337 338 type EipState struct { 339 // IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs. 340 Address pulumi.StringPtrInput 341 // ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC. 342 AllocationId pulumi.StringPtrInput 343 // User-specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address. 344 AssociateWithPrivateIp pulumi.StringPtrInput 345 // ID representing the association of the address with an instance in a VPC. 346 AssociationId pulumi.StringPtrInput 347 // Carrier IP address. 348 CarrierIp pulumi.StringPtrInput 349 // Customer owned IP. 350 CustomerOwnedIp pulumi.StringPtrInput 351 // ID of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing). 352 CustomerOwnedIpv4Pool pulumi.StringPtrInput 353 // Indicates if this EIP is for use in VPC (`vpc`). 354 Domain pulumi.StringPtrInput 355 // EC2 instance ID. 356 Instance pulumi.StringPtrInput 357 // Location from which the IP address is advertised. Use this parameter to limit the address to this location. 358 NetworkBorderGroup pulumi.StringPtrInput 359 // Network interface ID to associate with. 360 NetworkInterface pulumi.StringPtrInput 361 // The Private DNS associated with the Elastic IP address (if in VPC). 362 PrivateDns pulumi.StringPtrInput 363 // Contains the private IP address (if in VPC). 364 PrivateIp pulumi.StringPtrInput 365 // The DNS pointer (PTR) record for the IP address. 366 PtrRecord pulumi.StringPtrInput 367 // Public DNS associated with the Elastic IP address. 368 PublicDns pulumi.StringPtrInput 369 // Contains the public IP address. 370 PublicIp pulumi.StringPtrInput 371 // EC2 IPv4 address pool identifier or `amazon`. 372 // This option is only available for VPC EIPs. 373 PublicIpv4Pool pulumi.StringPtrInput 374 // Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 375 Tags pulumi.StringMapInput 376 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 377 // 378 // Deprecated: Please use `tags` instead. 379 TagsAll pulumi.StringMapInput 380 // Boolean if the EIP is in a VPC or not. Use `domain` instead. 381 // Defaults to `true` unless the region supports EC2-Classic. 382 // 383 // > **NOTE:** You can specify either the `instance` ID or the `networkInterface` ID, but not both. Including both will **not** return an error from the AWS API, but will have undefined behavior. See the relevant [AssociateAddress API Call][1] for more information. 384 // 385 // > **NOTE:** Specifying both `publicIpv4Pool` and `address` won't cause an error but `address` will be used in the 386 // case both options are defined as the api only requires one or the other. 387 // 388 // Deprecated: use domain attribute instead 389 Vpc pulumi.BoolPtrInput 390 } 391 392 func (EipState) ElementType() reflect.Type { 393 return reflect.TypeOf((*eipState)(nil)).Elem() 394 } 395 396 type eipArgs struct { 397 // IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs. 398 Address *string `pulumi:"address"` 399 // User-specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address. 400 AssociateWithPrivateIp *string `pulumi:"associateWithPrivateIp"` 401 // ID of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing). 402 CustomerOwnedIpv4Pool *string `pulumi:"customerOwnedIpv4Pool"` 403 // Indicates if this EIP is for use in VPC (`vpc`). 404 Domain *string `pulumi:"domain"` 405 // EC2 instance ID. 406 Instance *string `pulumi:"instance"` 407 // Location from which the IP address is advertised. Use this parameter to limit the address to this location. 408 NetworkBorderGroup *string `pulumi:"networkBorderGroup"` 409 // Network interface ID to associate with. 410 NetworkInterface *string `pulumi:"networkInterface"` 411 // EC2 IPv4 address pool identifier or `amazon`. 412 // This option is only available for VPC EIPs. 413 PublicIpv4Pool *string `pulumi:"publicIpv4Pool"` 414 // Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 415 Tags map[string]string `pulumi:"tags"` 416 // Boolean if the EIP is in a VPC or not. Use `domain` instead. 417 // Defaults to `true` unless the region supports EC2-Classic. 418 // 419 // > **NOTE:** You can specify either the `instance` ID or the `networkInterface` ID, but not both. Including both will **not** return an error from the AWS API, but will have undefined behavior. See the relevant [AssociateAddress API Call][1] for more information. 420 // 421 // > **NOTE:** Specifying both `publicIpv4Pool` and `address` won't cause an error but `address` will be used in the 422 // case both options are defined as the api only requires one or the other. 423 // 424 // Deprecated: use domain attribute instead 425 Vpc *bool `pulumi:"vpc"` 426 } 427 428 // The set of arguments for constructing a Eip resource. 429 type EipArgs struct { 430 // IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs. 431 Address pulumi.StringPtrInput 432 // User-specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address. 433 AssociateWithPrivateIp pulumi.StringPtrInput 434 // ID of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing). 435 CustomerOwnedIpv4Pool pulumi.StringPtrInput 436 // Indicates if this EIP is for use in VPC (`vpc`). 437 Domain pulumi.StringPtrInput 438 // EC2 instance ID. 439 Instance pulumi.StringPtrInput 440 // Location from which the IP address is advertised. Use this parameter to limit the address to this location. 441 NetworkBorderGroup pulumi.StringPtrInput 442 // Network interface ID to associate with. 443 NetworkInterface pulumi.StringPtrInput 444 // EC2 IPv4 address pool identifier or `amazon`. 445 // This option is only available for VPC EIPs. 446 PublicIpv4Pool pulumi.StringPtrInput 447 // Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 448 Tags pulumi.StringMapInput 449 // Boolean if the EIP is in a VPC or not. Use `domain` instead. 450 // Defaults to `true` unless the region supports EC2-Classic. 451 // 452 // > **NOTE:** You can specify either the `instance` ID or the `networkInterface` ID, but not both. Including both will **not** return an error from the AWS API, but will have undefined behavior. See the relevant [AssociateAddress API Call][1] for more information. 453 // 454 // > **NOTE:** Specifying both `publicIpv4Pool` and `address` won't cause an error but `address` will be used in the 455 // case both options are defined as the api only requires one or the other. 456 // 457 // Deprecated: use domain attribute instead 458 Vpc pulumi.BoolPtrInput 459 } 460 461 func (EipArgs) ElementType() reflect.Type { 462 return reflect.TypeOf((*eipArgs)(nil)).Elem() 463 } 464 465 type EipInput interface { 466 pulumi.Input 467 468 ToEipOutput() EipOutput 469 ToEipOutputWithContext(ctx context.Context) EipOutput 470 } 471 472 func (*Eip) ElementType() reflect.Type { 473 return reflect.TypeOf((**Eip)(nil)).Elem() 474 } 475 476 func (i *Eip) ToEipOutput() EipOutput { 477 return i.ToEipOutputWithContext(context.Background()) 478 } 479 480 func (i *Eip) ToEipOutputWithContext(ctx context.Context) EipOutput { 481 return pulumi.ToOutputWithContext(ctx, i).(EipOutput) 482 } 483 484 // EipArrayInput is an input type that accepts EipArray and EipArrayOutput values. 485 // You can construct a concrete instance of `EipArrayInput` via: 486 // 487 // EipArray{ EipArgs{...} } 488 type EipArrayInput interface { 489 pulumi.Input 490 491 ToEipArrayOutput() EipArrayOutput 492 ToEipArrayOutputWithContext(context.Context) EipArrayOutput 493 } 494 495 type EipArray []EipInput 496 497 func (EipArray) ElementType() reflect.Type { 498 return reflect.TypeOf((*[]*Eip)(nil)).Elem() 499 } 500 501 func (i EipArray) ToEipArrayOutput() EipArrayOutput { 502 return i.ToEipArrayOutputWithContext(context.Background()) 503 } 504 505 func (i EipArray) ToEipArrayOutputWithContext(ctx context.Context) EipArrayOutput { 506 return pulumi.ToOutputWithContext(ctx, i).(EipArrayOutput) 507 } 508 509 // EipMapInput is an input type that accepts EipMap and EipMapOutput values. 510 // You can construct a concrete instance of `EipMapInput` via: 511 // 512 // EipMap{ "key": EipArgs{...} } 513 type EipMapInput interface { 514 pulumi.Input 515 516 ToEipMapOutput() EipMapOutput 517 ToEipMapOutputWithContext(context.Context) EipMapOutput 518 } 519 520 type EipMap map[string]EipInput 521 522 func (EipMap) ElementType() reflect.Type { 523 return reflect.TypeOf((*map[string]*Eip)(nil)).Elem() 524 } 525 526 func (i EipMap) ToEipMapOutput() EipMapOutput { 527 return i.ToEipMapOutputWithContext(context.Background()) 528 } 529 530 func (i EipMap) ToEipMapOutputWithContext(ctx context.Context) EipMapOutput { 531 return pulumi.ToOutputWithContext(ctx, i).(EipMapOutput) 532 } 533 534 type EipOutput struct{ *pulumi.OutputState } 535 536 func (EipOutput) ElementType() reflect.Type { 537 return reflect.TypeOf((**Eip)(nil)).Elem() 538 } 539 540 func (o EipOutput) ToEipOutput() EipOutput { 541 return o 542 } 543 544 func (o EipOutput) ToEipOutputWithContext(ctx context.Context) EipOutput { 545 return o 546 } 547 548 // IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs. 549 func (o EipOutput) Address() pulumi.StringPtrOutput { 550 return o.ApplyT(func(v *Eip) pulumi.StringPtrOutput { return v.Address }).(pulumi.StringPtrOutput) 551 } 552 553 // ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC. 554 func (o EipOutput) AllocationId() pulumi.StringOutput { 555 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.AllocationId }).(pulumi.StringOutput) 556 } 557 558 // User-specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address. 559 func (o EipOutput) AssociateWithPrivateIp() pulumi.StringPtrOutput { 560 return o.ApplyT(func(v *Eip) pulumi.StringPtrOutput { return v.AssociateWithPrivateIp }).(pulumi.StringPtrOutput) 561 } 562 563 // ID representing the association of the address with an instance in a VPC. 564 func (o EipOutput) AssociationId() pulumi.StringOutput { 565 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.AssociationId }).(pulumi.StringOutput) 566 } 567 568 // Carrier IP address. 569 func (o EipOutput) CarrierIp() pulumi.StringOutput { 570 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.CarrierIp }).(pulumi.StringOutput) 571 } 572 573 // Customer owned IP. 574 func (o EipOutput) CustomerOwnedIp() pulumi.StringOutput { 575 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.CustomerOwnedIp }).(pulumi.StringOutput) 576 } 577 578 // ID of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing). 579 func (o EipOutput) CustomerOwnedIpv4Pool() pulumi.StringPtrOutput { 580 return o.ApplyT(func(v *Eip) pulumi.StringPtrOutput { return v.CustomerOwnedIpv4Pool }).(pulumi.StringPtrOutput) 581 } 582 583 // Indicates if this EIP is for use in VPC (`vpc`). 584 func (o EipOutput) Domain() pulumi.StringOutput { 585 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.Domain }).(pulumi.StringOutput) 586 } 587 588 // EC2 instance ID. 589 func (o EipOutput) Instance() pulumi.StringOutput { 590 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.Instance }).(pulumi.StringOutput) 591 } 592 593 // Location from which the IP address is advertised. Use this parameter to limit the address to this location. 594 func (o EipOutput) NetworkBorderGroup() pulumi.StringOutput { 595 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.NetworkBorderGroup }).(pulumi.StringOutput) 596 } 597 598 // Network interface ID to associate with. 599 func (o EipOutput) NetworkInterface() pulumi.StringOutput { 600 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.NetworkInterface }).(pulumi.StringOutput) 601 } 602 603 // The Private DNS associated with the Elastic IP address (if in VPC). 604 func (o EipOutput) PrivateDns() pulumi.StringOutput { 605 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.PrivateDns }).(pulumi.StringOutput) 606 } 607 608 // Contains the private IP address (if in VPC). 609 func (o EipOutput) PrivateIp() pulumi.StringOutput { 610 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.PrivateIp }).(pulumi.StringOutput) 611 } 612 613 // The DNS pointer (PTR) record for the IP address. 614 func (o EipOutput) PtrRecord() pulumi.StringOutput { 615 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.PtrRecord }).(pulumi.StringOutput) 616 } 617 618 // Public DNS associated with the Elastic IP address. 619 func (o EipOutput) PublicDns() pulumi.StringOutput { 620 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.PublicDns }).(pulumi.StringOutput) 621 } 622 623 // Contains the public IP address. 624 func (o EipOutput) PublicIp() pulumi.StringOutput { 625 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.PublicIp }).(pulumi.StringOutput) 626 } 627 628 // EC2 IPv4 address pool identifier or `amazon`. 629 // This option is only available for VPC EIPs. 630 func (o EipOutput) PublicIpv4Pool() pulumi.StringOutput { 631 return o.ApplyT(func(v *Eip) pulumi.StringOutput { return v.PublicIpv4Pool }).(pulumi.StringOutput) 632 } 633 634 // Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 635 func (o EipOutput) Tags() pulumi.StringMapOutput { 636 return o.ApplyT(func(v *Eip) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 637 } 638 639 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 640 // 641 // Deprecated: Please use `tags` instead. 642 func (o EipOutput) TagsAll() pulumi.StringMapOutput { 643 return o.ApplyT(func(v *Eip) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 644 } 645 646 // Boolean if the EIP is in a VPC or not. Use `domain` instead. 647 // Defaults to `true` unless the region supports EC2-Classic. 648 // 649 // > **NOTE:** You can specify either the `instance` ID or the `networkInterface` ID, but not both. Including both will **not** return an error from the AWS API, but will have undefined behavior. See the relevant [AssociateAddress API Call][1] for more information. 650 // 651 // > **NOTE:** Specifying both `publicIpv4Pool` and `address` won't cause an error but `address` will be used in the 652 // case both options are defined as the api only requires one or the other. 653 // 654 // Deprecated: use domain attribute instead 655 func (o EipOutput) Vpc() pulumi.BoolOutput { 656 return o.ApplyT(func(v *Eip) pulumi.BoolOutput { return v.Vpc }).(pulumi.BoolOutput) 657 } 658 659 type EipArrayOutput struct{ *pulumi.OutputState } 660 661 func (EipArrayOutput) ElementType() reflect.Type { 662 return reflect.TypeOf((*[]*Eip)(nil)).Elem() 663 } 664 665 func (o EipArrayOutput) ToEipArrayOutput() EipArrayOutput { 666 return o 667 } 668 669 func (o EipArrayOutput) ToEipArrayOutputWithContext(ctx context.Context) EipArrayOutput { 670 return o 671 } 672 673 func (o EipArrayOutput) Index(i pulumi.IntInput) EipOutput { 674 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Eip { 675 return vs[0].([]*Eip)[vs[1].(int)] 676 }).(EipOutput) 677 } 678 679 type EipMapOutput struct{ *pulumi.OutputState } 680 681 func (EipMapOutput) ElementType() reflect.Type { 682 return reflect.TypeOf((*map[string]*Eip)(nil)).Elem() 683 } 684 685 func (o EipMapOutput) ToEipMapOutput() EipMapOutput { 686 return o 687 } 688 689 func (o EipMapOutput) ToEipMapOutputWithContext(ctx context.Context) EipMapOutput { 690 return o 691 } 692 693 func (o EipMapOutput) MapIndex(k pulumi.StringInput) EipOutput { 694 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Eip { 695 return vs[0].(map[string]*Eip)[vs[1].(string)] 696 }).(EipOutput) 697 } 698 699 func init() { 700 pulumi.RegisterInputType(reflect.TypeOf((*EipInput)(nil)).Elem(), &Eip{}) 701 pulumi.RegisterInputType(reflect.TypeOf((*EipArrayInput)(nil)).Elem(), EipArray{}) 702 pulumi.RegisterInputType(reflect.TypeOf((*EipMapInput)(nil)).Elem(), EipMap{}) 703 pulumi.RegisterOutputType(EipOutput{}) 704 pulumi.RegisterOutputType(EipArrayOutput{}) 705 pulumi.RegisterOutputType(EipMapOutput{}) 706 }