Try AWS Native preview for resources not in the classic version.
aws.ec2.Eip
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides an Elastic IP resource.
Note: EIP may require IGW to exist prior to association. Use
depends_on
to set an explicit dependency on the IGW.
Note: Do not use
network_interface
to associate the EIP toaws.lb.LoadBalancer
oraws.ec2.NatGateway
resources. Instead use theallocation_id
available in those resources to allow AWS to manage the association, otherwise you will seeAuthFailure
errors.
Example Usage
Single EIP associated with an instance
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const lb = new aws.ec2.Eip("lb", {
instance: web.id,
domain: "vpc",
});
import pulumi
import pulumi_aws as aws
lb = aws.ec2.Eip("lb",
instance=web["id"],
domain="vpc")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewEip(ctx, "lb", &ec2.EipArgs{
Instance: pulumi.Any(web.Id),
Domain: pulumi.String("vpc"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var lb = new Aws.Ec2.Eip("lb", new()
{
Instance = web.Id,
Domain = "vpc",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Eip;
import com.pulumi.aws.ec2.EipArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var lb = new Eip("lb", EipArgs.builder()
.instance(web.id())
.domain("vpc")
.build());
}
}
resources:
lb:
type: aws:ec2:Eip
properties:
instance: ${web.id}
domain: vpc
Multiple EIPs associated with a single network interface
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const multi_ip = new aws.ec2.NetworkInterface("multi-ip", {
subnetId: main.id,
privateIps: [
"10.0.0.10",
"10.0.0.11",
],
});
const one = new aws.ec2.Eip("one", {
domain: "vpc",
networkInterface: multi_ip.id,
associateWithPrivateIp: "10.0.0.10",
});
const two = new aws.ec2.Eip("two", {
domain: "vpc",
networkInterface: multi_ip.id,
associateWithPrivateIp: "10.0.0.11",
});
import pulumi
import pulumi_aws as aws
multi_ip = aws.ec2.NetworkInterface("multi-ip",
subnet_id=main["id"],
private_ips=[
"10.0.0.10",
"10.0.0.11",
])
one = aws.ec2.Eip("one",
domain="vpc",
network_interface=multi_ip.id,
associate_with_private_ip="10.0.0.10")
two = aws.ec2.Eip("two",
domain="vpc",
network_interface=multi_ip.id,
associate_with_private_ip="10.0.0.11")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewNetworkInterface(ctx, "multi-ip", &ec2.NetworkInterfaceArgs{
SubnetId: pulumi.Any(main.Id),
PrivateIps: pulumi.StringArray{
pulumi.String("10.0.0.10"),
pulumi.String("10.0.0.11"),
},
})
if err != nil {
return err
}
_, err = ec2.NewEip(ctx, "one", &ec2.EipArgs{
Domain: pulumi.String("vpc"),
NetworkInterface: multi_ip.ID(),
AssociateWithPrivateIp: pulumi.String("10.0.0.10"),
})
if err != nil {
return err
}
_, err = ec2.NewEip(ctx, "two", &ec2.EipArgs{
Domain: pulumi.String("vpc"),
NetworkInterface: multi_ip.ID(),
AssociateWithPrivateIp: pulumi.String("10.0.0.11"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var multi_ip = new Aws.Ec2.NetworkInterface("multi-ip", new()
{
SubnetId = main.Id,
PrivateIps = new[]
{
"10.0.0.10",
"10.0.0.11",
},
});
var one = new Aws.Ec2.Eip("one", new()
{
Domain = "vpc",
NetworkInterface = multi_ip.Id,
AssociateWithPrivateIp = "10.0.0.10",
});
var two = new Aws.Ec2.Eip("two", new()
{
Domain = "vpc",
NetworkInterface = multi_ip.Id,
AssociateWithPrivateIp = "10.0.0.11",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.NetworkInterface;
import com.pulumi.aws.ec2.NetworkInterfaceArgs;
import com.pulumi.aws.ec2.Eip;
import com.pulumi.aws.ec2.EipArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var multi_ip = new NetworkInterface("multi-ip", NetworkInterfaceArgs.builder()
.subnetId(main.id())
.privateIps(
"10.0.0.10",
"10.0.0.11")
.build());
var one = new Eip("one", EipArgs.builder()
.domain("vpc")
.networkInterface(multi_ip.id())
.associateWithPrivateIp("10.0.0.10")
.build());
var two = new Eip("two", EipArgs.builder()
.domain("vpc")
.networkInterface(multi_ip.id())
.associateWithPrivateIp("10.0.0.11")
.build());
}
}
resources:
multi-ip:
type: aws:ec2:NetworkInterface
properties:
subnetId: ${main.id}
privateIps:
- 10.0.0.10
- 10.0.0.11
one:
type: aws:ec2:Eip
properties:
domain: vpc
networkInterface: ${["multi-ip"].id}
associateWithPrivateIp: 10.0.0.10
two:
type: aws:ec2:Eip
properties:
domain: vpc
networkInterface: ${["multi-ip"].id}
associateWithPrivateIp: 10.0.0.11
Attaching an EIP to an Instance with a pre-assigned private ip (VPC Only)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const _default = new aws.ec2.Vpc("default", {
cidrBlock: "10.0.0.0/16",
enableDnsHostnames: true,
});
const gw = new aws.ec2.InternetGateway("gw", {vpcId: _default.id});
const myTestSubnet = new aws.ec2.Subnet("my_test_subnet", {
vpcId: _default.id,
cidrBlock: "10.0.0.0/24",
mapPublicIpOnLaunch: true,
}, {
dependsOn: [gw],
});
const foo = new aws.ec2.Instance("foo", {
ami: "ami-5189a661",
instanceType: aws.ec2.InstanceType.T2_Micro,
privateIp: "10.0.0.12",
subnetId: myTestSubnet.id,
});
const bar = new aws.ec2.Eip("bar", {
domain: "vpc",
instance: foo.id,
associateWithPrivateIp: "10.0.0.12",
}, {
dependsOn: [gw],
});
import pulumi
import pulumi_aws as aws
default = aws.ec2.Vpc("default",
cidr_block="10.0.0.0/16",
enable_dns_hostnames=True)
gw = aws.ec2.InternetGateway("gw", vpc_id=default.id)
my_test_subnet = aws.ec2.Subnet("my_test_subnet",
vpc_id=default.id,
cidr_block="10.0.0.0/24",
map_public_ip_on_launch=True,
opts = pulumi.ResourceOptions(depends_on=[gw]))
foo = aws.ec2.Instance("foo",
ami="ami-5189a661",
instance_type=aws.ec2.InstanceType.T2_MICRO,
private_ip="10.0.0.12",
subnet_id=my_test_subnet.id)
bar = aws.ec2.Eip("bar",
domain="vpc",
instance=foo.id,
associate_with_private_ip="10.0.0.12",
opts = pulumi.ResourceOptions(depends_on=[gw]))
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewVpc(ctx, "default", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
EnableDnsHostnames: pulumi.Bool(true),
})
if err != nil {
return err
}
gw, err := ec2.NewInternetGateway(ctx, "gw", &ec2.InternetGatewayArgs{
VpcId: _default.ID(),
})
if err != nil {
return err
}
myTestSubnet, err := ec2.NewSubnet(ctx, "my_test_subnet", &ec2.SubnetArgs{
VpcId: _default.ID(),
CidrBlock: pulumi.String("10.0.0.0/24"),
MapPublicIpOnLaunch: pulumi.Bool(true),
}, pulumi.DependsOn([]pulumi.Resource{
gw,
}))
if err != nil {
return err
}
foo, err := ec2.NewInstance(ctx, "foo", &ec2.InstanceArgs{
Ami: pulumi.String("ami-5189a661"),
InstanceType: pulumi.String(ec2.InstanceType_T2_Micro),
PrivateIp: pulumi.String("10.0.0.12"),
SubnetId: myTestSubnet.ID(),
})
if err != nil {
return err
}
_, err = ec2.NewEip(ctx, "bar", &ec2.EipArgs{
Domain: pulumi.String("vpc"),
Instance: foo.ID(),
AssociateWithPrivateIp: pulumi.String("10.0.0.12"),
}, pulumi.DependsOn([]pulumi.Resource{
gw,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var @default = new Aws.Ec2.Vpc("default", new()
{
CidrBlock = "10.0.0.0/16",
EnableDnsHostnames = true,
});
var gw = new Aws.Ec2.InternetGateway("gw", new()
{
VpcId = @default.Id,
});
var myTestSubnet = new Aws.Ec2.Subnet("my_test_subnet", new()
{
VpcId = @default.Id,
CidrBlock = "10.0.0.0/24",
MapPublicIpOnLaunch = true,
}, new CustomResourceOptions
{
DependsOn =
{
gw,
},
});
var foo = new Aws.Ec2.Instance("foo", new()
{
Ami = "ami-5189a661",
InstanceType = Aws.Ec2.InstanceType.T2_Micro,
PrivateIp = "10.0.0.12",
SubnetId = myTestSubnet.Id,
});
var bar = new Aws.Ec2.Eip("bar", new()
{
Domain = "vpc",
Instance = foo.Id,
AssociateWithPrivateIp = "10.0.0.12",
}, new CustomResourceOptions
{
DependsOn =
{
gw,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.InternetGateway;
import com.pulumi.aws.ec2.InternetGatewayArgs;
import com.pulumi.aws.ec2.Subnet;
import com.pulumi.aws.ec2.SubnetArgs;
import com.pulumi.aws.ec2.Instance;
import com.pulumi.aws.ec2.InstanceArgs;
import com.pulumi.aws.ec2.Eip;
import com.pulumi.aws.ec2.EipArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Vpc("default", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.enableDnsHostnames(true)
.build());
var gw = new InternetGateway("gw", InternetGatewayArgs.builder()
.vpcId(default_.id())
.build());
var myTestSubnet = new Subnet("myTestSubnet", SubnetArgs.builder()
.vpcId(default_.id())
.cidrBlock("10.0.0.0/24")
.mapPublicIpOnLaunch(true)
.build(), CustomResourceOptions.builder()
.dependsOn(gw)
.build());
var foo = new Instance("foo", InstanceArgs.builder()
.ami("ami-5189a661")
.instanceType("t2.micro")
.privateIp("10.0.0.12")
.subnetId(myTestSubnet.id())
.build());
var bar = new Eip("bar", EipArgs.builder()
.domain("vpc")
.instance(foo.id())
.associateWithPrivateIp("10.0.0.12")
.build(), CustomResourceOptions.builder()
.dependsOn(gw)
.build());
}
}
resources:
default:
type: aws:ec2:Vpc
properties:
cidrBlock: 10.0.0.0/16
enableDnsHostnames: true
gw:
type: aws:ec2:InternetGateway
properties:
vpcId: ${default.id}
myTestSubnet:
type: aws:ec2:Subnet
name: my_test_subnet
properties:
vpcId: ${default.id}
cidrBlock: 10.0.0.0/24
mapPublicIpOnLaunch: true
options:
dependson:
- ${gw}
foo:
type: aws:ec2:Instance
properties:
ami: ami-5189a661
instanceType: t2.micro
privateIp: 10.0.0.12
subnetId: ${myTestSubnet.id}
bar:
type: aws:ec2:Eip
properties:
domain: vpc
instance: ${foo.id}
associateWithPrivateIp: 10.0.0.12
options:
dependson:
- ${gw}
Allocating EIP from the BYOIP pool
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const byoip_ip = new aws.ec2.Eip("byoip-ip", {
domain: "vpc",
publicIpv4Pool: "ipv4pool-ec2-012345",
});
import pulumi
import pulumi_aws as aws
byoip_ip = aws.ec2.Eip("byoip-ip",
domain="vpc",
public_ipv4_pool="ipv4pool-ec2-012345")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewEip(ctx, "byoip-ip", &ec2.EipArgs{
Domain: pulumi.String("vpc"),
PublicIpv4Pool: pulumi.String("ipv4pool-ec2-012345"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var byoip_ip = new Aws.Ec2.Eip("byoip-ip", new()
{
Domain = "vpc",
PublicIpv4Pool = "ipv4pool-ec2-012345",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Eip;
import com.pulumi.aws.ec2.EipArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var byoip_ip = new Eip("byoip-ip", EipArgs.builder()
.domain("vpc")
.publicIpv4Pool("ipv4pool-ec2-012345")
.build());
}
}
resources:
byoip-ip:
type: aws:ec2:Eip
properties:
domain: vpc
publicIpv4Pool: ipv4pool-ec2-012345
Create Eip Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Eip(name: string, args?: EipArgs, opts?: CustomResourceOptions);
@overload
def Eip(resource_name: str,
args: Optional[EipArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Eip(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
associate_with_private_ip: Optional[str] = None,
customer_owned_ipv4_pool: Optional[str] = None,
domain: Optional[str] = None,
instance: Optional[str] = None,
network_border_group: Optional[str] = None,
network_interface: Optional[str] = None,
public_ipv4_pool: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc: Optional[bool] = None)
func NewEip(ctx *Context, name string, args *EipArgs, opts ...ResourceOption) (*Eip, error)
public Eip(string name, EipArgs? args = null, CustomResourceOptions? opts = null)
type: aws:ec2:Eip
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args EipArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EipArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EipArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var eipResource = new Aws.Ec2.Eip("eipResource", new()
{
Address = "string",
AssociateWithPrivateIp = "string",
CustomerOwnedIpv4Pool = "string",
Domain = "string",
Instance = "string",
NetworkBorderGroup = "string",
NetworkInterface = "string",
PublicIpv4Pool = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ec2.NewEip(ctx, "eipResource", &ec2.EipArgs{
Address: pulumi.String("string"),
AssociateWithPrivateIp: pulumi.String("string"),
CustomerOwnedIpv4Pool: pulumi.String("string"),
Domain: pulumi.String("string"),
Instance: pulumi.String("string"),
NetworkBorderGroup: pulumi.String("string"),
NetworkInterface: pulumi.String("string"),
PublicIpv4Pool: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var eipResource = new Eip("eipResource", EipArgs.builder()
.address("string")
.associateWithPrivateIp("string")
.customerOwnedIpv4Pool("string")
.domain("string")
.instance("string")
.networkBorderGroup("string")
.networkInterface("string")
.publicIpv4Pool("string")
.tags(Map.of("string", "string"))
.build());
eip_resource = aws.ec2.Eip("eipResource",
address="string",
associate_with_private_ip="string",
customer_owned_ipv4_pool="string",
domain="string",
instance="string",
network_border_group="string",
network_interface="string",
public_ipv4_pool="string",
tags={
"string": "string",
})
const eipResource = new aws.ec2.Eip("eipResource", {
address: "string",
associateWithPrivateIp: "string",
customerOwnedIpv4Pool: "string",
domain: "string",
instance: "string",
networkBorderGroup: "string",
networkInterface: "string",
publicIpv4Pool: "string",
tags: {
string: "string",
},
});
type: aws:ec2:Eip
properties:
address: string
associateWithPrivateIp: string
customerOwnedIpv4Pool: string
domain: string
instance: string
networkBorderGroup: string
networkInterface: string
publicIpv4Pool: string
tags:
string: string
Eip Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Eip resource accepts the following input properties:
- Address string
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- Associate
With stringPrivate Ip - 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.
- Customer
Owned stringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- Domain string
- Indicates if this EIP is for use in VPC (
vpc
). - Instance string
- EC2 instance ID.
- Network
Border stringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- Network
Interface string - Network interface ID to associate with.
- Public
Ipv4Pool string - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Dictionary<string, string>
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Vpc bool
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- Address string
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- Associate
With stringPrivate Ip - 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.
- Customer
Owned stringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- Domain string
- Indicates if this EIP is for use in VPC (
vpc
). - Instance string
- EC2 instance ID.
- Network
Border stringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- Network
Interface string - Network interface ID to associate with.
- Public
Ipv4Pool string - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - map[string]string
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Vpc bool
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address String
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- associate
With StringPrivate Ip - 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.
- customer
Owned StringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain String
- Indicates if this EIP is for use in VPC (
vpc
). - instance String
- EC2 instance ID.
- network
Border StringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network
Interface String - Network interface ID to associate with.
- public
Ipv4Pool String - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Map<String,String>
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc Boolean
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address string
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- associate
With stringPrivate Ip - 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.
- customer
Owned stringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain string
- Indicates if this EIP is for use in VPC (
vpc
). - instance string
- EC2 instance ID.
- network
Border stringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network
Interface string - Network interface ID to associate with.
- public
Ipv4Pool string - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - {[key: string]: string}
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc boolean
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address str
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- associate_
with_ strprivate_ ip - 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.
- customer_
owned_ stripv4_ pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain str
- Indicates if this EIP is for use in VPC (
vpc
). - instance str
- EC2 instance ID.
- network_
border_ strgroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network_
interface str - Network interface ID to associate with.
- public_
ipv4_ strpool - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Mapping[str, str]
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc bool
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address String
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- associate
With StringPrivate Ip - 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.
- customer
Owned StringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain String
- Indicates if this EIP is for use in VPC (
vpc
). - instance String
- EC2 instance ID.
- network
Border StringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network
Interface String - Network interface ID to associate with.
- public
Ipv4Pool String - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Map<String>
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc Boolean
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
Outputs
All input properties are implicitly available as output properties. Additionally, the Eip resource produces the following output properties:
- Allocation
Id string - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- Association
Id string - ID representing the association of the address with an instance in a VPC.
- Carrier
Ip string - Carrier IP address.
- Customer
Owned stringIp - Customer owned IP.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Dns string - The Private DNS associated with the Elastic IP address (if in VPC).
- Private
Ip string - Contains the private IP address (if in VPC).
- Ptr
Record string - The DNS pointer (PTR) record for the IP address.
- Public
Dns string - Public DNS associated with the Elastic IP address.
- Public
Ip string - Contains the public IP address.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Allocation
Id string - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- Association
Id string - ID representing the association of the address with an instance in a VPC.
- Carrier
Ip string - Carrier IP address.
- Customer
Owned stringIp - Customer owned IP.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Dns string - The Private DNS associated with the Elastic IP address (if in VPC).
- Private
Ip string - Contains the private IP address (if in VPC).
- Ptr
Record string - The DNS pointer (PTR) record for the IP address.
- Public
Dns string - Public DNS associated with the Elastic IP address.
- Public
Ip string - Contains the public IP address.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allocation
Id String - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- association
Id String - ID representing the association of the address with an instance in a VPC.
- carrier
Ip String - Carrier IP address.
- customer
Owned StringIp - Customer owned IP.
- id String
- The provider-assigned unique ID for this managed resource.
- private
Dns String - The Private DNS associated with the Elastic IP address (if in VPC).
- private
Ip String - Contains the private IP address (if in VPC).
- ptr
Record String - The DNS pointer (PTR) record for the IP address.
- public
Dns String - Public DNS associated with the Elastic IP address.
- public
Ip String - Contains the public IP address.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allocation
Id string - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn string
- association
Id string - ID representing the association of the address with an instance in a VPC.
- carrier
Ip string - Carrier IP address.
- customer
Owned stringIp - Customer owned IP.
- id string
- The provider-assigned unique ID for this managed resource.
- private
Dns string - The Private DNS associated with the Elastic IP address (if in VPC).
- private
Ip string - Contains the private IP address (if in VPC).
- ptr
Record string - The DNS pointer (PTR) record for the IP address.
- public
Dns string - Public DNS associated with the Elastic IP address.
- public
Ip string - Contains the public IP address.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allocation_
id str - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn str
- association_
id str - ID representing the association of the address with an instance in a VPC.
- carrier_
ip str - Carrier IP address.
- customer_
owned_ strip - Customer owned IP.
- id str
- The provider-assigned unique ID for this managed resource.
- private_
dns str - The Private DNS associated with the Elastic IP address (if in VPC).
- private_
ip str - Contains the private IP address (if in VPC).
- ptr_
record str - The DNS pointer (PTR) record for the IP address.
- public_
dns str - Public DNS associated with the Elastic IP address.
- public_
ip str - Contains the public IP address.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- allocation
Id String - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- association
Id String - ID representing the association of the address with an instance in a VPC.
- carrier
Ip String - Carrier IP address.
- customer
Owned StringIp - Customer owned IP.
- id String
- The provider-assigned unique ID for this managed resource.
- private
Dns String - The Private DNS associated with the Elastic IP address (if in VPC).
- private
Ip String - Contains the private IP address (if in VPC).
- ptr
Record String - The DNS pointer (PTR) record for the IP address.
- public
Dns String - Public DNS associated with the Elastic IP address.
- public
Ip String - Contains the public IP address.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing Eip Resource
Get an existing Eip resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: EipState, opts?: CustomResourceOptions): Eip
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
allocation_id: Optional[str] = None,
arn: Optional[str] = None,
associate_with_private_ip: Optional[str] = None,
association_id: Optional[str] = None,
carrier_ip: Optional[str] = None,
customer_owned_ip: Optional[str] = None,
customer_owned_ipv4_pool: Optional[str] = None,
domain: Optional[str] = None,
instance: Optional[str] = None,
network_border_group: Optional[str] = None,
network_interface: Optional[str] = None,
private_dns: Optional[str] = None,
private_ip: Optional[str] = None,
ptr_record: Optional[str] = None,
public_dns: Optional[str] = None,
public_ip: Optional[str] = None,
public_ipv4_pool: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
vpc: Optional[bool] = None) -> Eip
func GetEip(ctx *Context, name string, id IDInput, state *EipState, opts ...ResourceOption) (*Eip, error)
public static Eip Get(string name, Input<string> id, EipState? state, CustomResourceOptions? opts = null)
public static Eip get(String name, Output<String> id, EipState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Address string
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- Allocation
Id string - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- Associate
With stringPrivate Ip - 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.
- Association
Id string - ID representing the association of the address with an instance in a VPC.
- Carrier
Ip string - Carrier IP address.
- Customer
Owned stringIp - Customer owned IP.
- Customer
Owned stringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- Domain string
- Indicates if this EIP is for use in VPC (
vpc
). - Instance string
- EC2 instance ID.
- Network
Border stringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- Network
Interface string - Network interface ID to associate with.
- Private
Dns string - The Private DNS associated with the Elastic IP address (if in VPC).
- Private
Ip string - Contains the private IP address (if in VPC).
- Ptr
Record string - The DNS pointer (PTR) record for the IP address.
- Public
Dns string - Public DNS associated with the Elastic IP address.
- Public
Ip string - Contains the public IP address.
- Public
Ipv4Pool string - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Dictionary<string, string>
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc bool
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- Address string
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- Allocation
Id string - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- Associate
With stringPrivate Ip - 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.
- Association
Id string - ID representing the association of the address with an instance in a VPC.
- Carrier
Ip string - Carrier IP address.
- Customer
Owned stringIp - Customer owned IP.
- Customer
Owned stringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- Domain string
- Indicates if this EIP is for use in VPC (
vpc
). - Instance string
- EC2 instance ID.
- Network
Border stringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- Network
Interface string - Network interface ID to associate with.
- Private
Dns string - The Private DNS associated with the Elastic IP address (if in VPC).
- Private
Ip string - Contains the private IP address (if in VPC).
- Ptr
Record string - The DNS pointer (PTR) record for the IP address.
- Public
Dns string - Public DNS associated with the Elastic IP address.
- Public
Ip string - Contains the public IP address.
- Public
Ipv4Pool string - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - map[string]string
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc bool
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address String
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- allocation
Id String - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- associate
With StringPrivate Ip - 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.
- association
Id String - ID representing the association of the address with an instance in a VPC.
- carrier
Ip String - Carrier IP address.
- customer
Owned StringIp - Customer owned IP.
- customer
Owned StringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain String
- Indicates if this EIP is for use in VPC (
vpc
). - instance String
- EC2 instance ID.
- network
Border StringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network
Interface String - Network interface ID to associate with.
- private
Dns String - The Private DNS associated with the Elastic IP address (if in VPC).
- private
Ip String - Contains the private IP address (if in VPC).
- ptr
Record String - The DNS pointer (PTR) record for the IP address.
- public
Dns String - Public DNS associated with the Elastic IP address.
- public
Ip String - Contains the public IP address.
- public
Ipv4Pool String - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Map<String,String>
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc Boolean
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address string
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- allocation
Id string - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn string
- associate
With stringPrivate Ip - 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.
- association
Id string - ID representing the association of the address with an instance in a VPC.
- carrier
Ip string - Carrier IP address.
- customer
Owned stringIp - Customer owned IP.
- customer
Owned stringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain string
- Indicates if this EIP is for use in VPC (
vpc
). - instance string
- EC2 instance ID.
- network
Border stringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network
Interface string - Network interface ID to associate with.
- private
Dns string - The Private DNS associated with the Elastic IP address (if in VPC).
- private
Ip string - Contains the private IP address (if in VPC).
- ptr
Record string - The DNS pointer (PTR) record for the IP address.
- public
Dns string - Public DNS associated with the Elastic IP address.
- public
Ip string - Contains the public IP address.
- public
Ipv4Pool string - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - {[key: string]: string}
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc boolean
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address str
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- allocation_
id str - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn str
- associate_
with_ strprivate_ ip - 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.
- association_
id str - ID representing the association of the address with an instance in a VPC.
- carrier_
ip str - Carrier IP address.
- customer_
owned_ strip - Customer owned IP.
- customer_
owned_ stripv4_ pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain str
- Indicates if this EIP is for use in VPC (
vpc
). - instance str
- EC2 instance ID.
- network_
border_ strgroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network_
interface str - Network interface ID to associate with.
- private_
dns str - The Private DNS associated with the Elastic IP address (if in VPC).
- private_
ip str - Contains the private IP address (if in VPC).
- ptr_
record str - The DNS pointer (PTR) record for the IP address.
- public_
dns str - Public DNS associated with the Elastic IP address.
- public_
ip str - Contains the public IP address.
- public_
ipv4_ strpool - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Mapping[str, str]
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc bool
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
- address String
- IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
- allocation
Id String - ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- associate
With StringPrivate Ip - 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.
- association
Id String - ID representing the association of the address with an instance in a VPC.
- carrier
Ip String - Carrier IP address.
- customer
Owned StringIp - Customer owned IP.
- customer
Owned StringIpv4Pool - ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide.
- domain String
- Indicates if this EIP is for use in VPC (
vpc
). - instance String
- EC2 instance ID.
- network
Border StringGroup - Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- network
Interface String - Network interface ID to associate with.
- private
Dns String - The Private DNS associated with the Elastic IP address (if in VPC).
- private
Ip String - Contains the private IP address (if in VPC).
- ptr
Record String - The DNS pointer (PTR) record for the IP address.
- public
Dns String - Public DNS associated with the Elastic IP address.
- public
Ip String - Contains the public IP address.
- public
Ipv4Pool String - EC2 IPv4 address pool identifier or
amazon
. This option is only available for VPC EIPs. - Map<String>
- Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc Boolean
Boolean if the EIP is in a VPC or not. Use
domain
instead. Defaults totrue
unless the region supports EC2-Classic.NOTE: You can specify either the
instance
ID or thenetwork_interface
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.NOTE: Specifying both
public_ipv4_pool
andaddress
won't cause an error butaddress
will be used in the case both options are defined as the api only requires one or the other.
Import
Using pulumi import
, import EIPs in a VPC using their Allocation ID. For example:
$ pulumi import aws:ec2/eip:Eip bar eipalloc-00a10e96
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.