aws.ec2.Eip
Explore with Pulumi AI
Provides an Elastic IP resource.
Note: EIP may require IGW to exist prior to association. Use
depends_onto set an explicit dependency on the IGW.
Note: Do not use
network_interfaceto associate the EIP toaws.lb.LoadBalanceroraws.ec2.NatGatewayresources. Instead use theallocation_idavailable in those resources to allow AWS to manage the association, otherwise you will seeAuthFailureerrors.
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 {
		multi_ip, 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 {
		_default, 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
Allocating EIP from the IPAM Pool
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ipam_ip = new aws.ec2.Eip("ipam-ip", {
    domain: "vpc",
    ipamPoolId: "ipam-pool-07ccc86aa41bef7ce",
});
import pulumi
import pulumi_aws as aws
ipam_ip = aws.ec2.Eip("ipam-ip",
    domain="vpc",
    ipam_pool_id="ipam-pool-07ccc86aa41bef7ce")
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, "ipam-ip", &ec2.EipArgs{
			Domain:     pulumi.String("vpc"),
			IpamPoolId: pulumi.String("ipam-pool-07ccc86aa41bef7ce"),
		})
		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 ipam_ip = new Aws.Ec2.Eip("ipam-ip", new()
    {
        Domain = "vpc",
        IpamPoolId = "ipam-pool-07ccc86aa41bef7ce",
    });
});
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 ipam_ip = new Eip("ipam-ip", EipArgs.builder()
            .domain("vpc")
            .ipamPoolId("ipam-pool-07ccc86aa41bef7ce")
            .build());
    }
}
resources:
  ipam-ip:
    type: aws:ec2:Eip
    properties:
      domain: vpc
      ipamPoolId: ipam-pool-07ccc86aa41bef7ce
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,
        ipam_pool_id: 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",
    IpamPoolId = "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"),
	IpamPoolId:             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")
    .ipamPoolId("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",
    ipam_pool_id="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",
    ipamPoolId: "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
    ipamPoolId: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- AssociateWith 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.
- CustomerOwned 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.
- IpamPool stringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- NetworkBorder stringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- NetworkInterface string
- Network interface ID to associate with.
- PublicIpv4Pool 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_tagsconfiguration 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 - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- AssociateWith 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.
- CustomerOwned 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.
- IpamPool stringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- NetworkBorder stringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- NetworkInterface string
- Network interface ID to associate with.
- PublicIpv4Pool 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_tagsconfiguration 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 - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- associateWith 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.
- customerOwned 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.
- ipamPool StringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- networkBorder StringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- networkInterface String
- Network interface ID to associate with.
- publicIpv4Pool 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_tagsconfiguration 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 - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- associateWith 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.
- customerOwned 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.
- ipamPool stringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- networkBorder stringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- networkInterface string
- Network interface ID to associate with.
- publicIpv4Pool 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_tagsconfiguration 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 - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- ipam_pool_ strid 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- 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_tagsconfiguration 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 - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- associateWith 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.
- customerOwned 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.
- ipamPool StringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- networkBorder StringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- networkInterface String
- Network interface ID to associate with.
- publicIpv4Pool 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_tagsconfiguration 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 - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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:
- AllocationId string
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- AssociationId string
- ID representing the association of the address with an instance in a VPC.
- CarrierIp string
- Carrier IP address.
- CustomerOwned stringIp 
- Customer owned IP.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrivateDns string
- The Private DNS associated with the Elastic IP address (if in VPC).
- PrivateIp string
- Contains the private IP address (if in VPC).
- PtrRecord string
- The DNS pointer (PTR) record for the IP address.
- PublicDns string
- Public DNS associated with the Elastic IP address.
- PublicIp string
- Contains the public IP address.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- AllocationId string
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- AssociationId string
- ID representing the association of the address with an instance in a VPC.
- CarrierIp string
- Carrier IP address.
- CustomerOwned stringIp 
- Customer owned IP.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrivateDns string
- The Private DNS associated with the Elastic IP address (if in VPC).
- PrivateIp string
- Contains the private IP address (if in VPC).
- PtrRecord string
- The DNS pointer (PTR) record for the IP address.
- PublicDns string
- Public DNS associated with the Elastic IP address.
- PublicIp string
- Contains the public IP address.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- allocationId String
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- associationId String
- ID representing the association of the address with an instance in a VPC.
- carrierIp String
- Carrier IP address.
- customerOwned StringIp 
- Customer owned IP.
- id String
- The provider-assigned unique ID for this managed resource.
- privateDns String
- The Private DNS associated with the Elastic IP address (if in VPC).
- privateIp String
- Contains the private IP address (if in VPC).
- ptrRecord String
- The DNS pointer (PTR) record for the IP address.
- publicDns String
- Public DNS associated with the Elastic IP address.
- publicIp String
- Contains the public IP address.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- allocationId string
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn string
- associationId string
- ID representing the association of the address with an instance in a VPC.
- carrierIp string
- Carrier IP address.
- customerOwned stringIp 
- Customer owned IP.
- id string
- The provider-assigned unique ID for this managed resource.
- privateDns string
- The Private DNS associated with the Elastic IP address (if in VPC).
- privateIp string
- Contains the private IP address (if in VPC).
- ptrRecord string
- The DNS pointer (PTR) record for the IP address.
- publicDns string
- Public DNS associated with the Elastic IP address.
- publicIp string
- Contains the public IP address.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration 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_tagsconfiguration block.
- allocationId String
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- associationId String
- ID representing the association of the address with an instance in a VPC.
- carrierIp String
- Carrier IP address.
- customerOwned StringIp 
- Customer owned IP.
- id String
- The provider-assigned unique ID for this managed resource.
- privateDns String
- The Private DNS associated with the Elastic IP address (if in VPC).
- privateIp String
- Contains the private IP address (if in VPC).
- ptrRecord String
- The DNS pointer (PTR) record for the IP address.
- publicDns String
- Public DNS associated with the Elastic IP address.
- publicIp String
- Contains the public IP address.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration 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,
        ipam_pool_id: 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) -> Eipfunc 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)resources:  _:    type: aws:ec2:Eip    get:      id: ${id}- 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.
- AllocationId string
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- AssociateWith 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.
- AssociationId string
- ID representing the association of the address with an instance in a VPC.
- CarrierIp string
- Carrier IP address.
- CustomerOwned stringIp 
- Customer owned IP.
- CustomerOwned 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.
- IpamPool stringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- NetworkBorder stringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- NetworkInterface string
- Network interface ID to associate with.
- PrivateDns string
- The Private DNS associated with the Elastic IP address (if in VPC).
- PrivateIp string
- Contains the private IP address (if in VPC).
- PtrRecord string
- The DNS pointer (PTR) record for the IP address.
- PublicDns string
- Public DNS associated with the Elastic IP address.
- PublicIp string
- Contains the public IP address.
- PublicIpv4Pool 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_tagsconfiguration 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_tagsconfiguration block.
- Vpc bool
- Boolean if the EIP is in a VPC or not. Use - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- AllocationId string
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Arn string
- AssociateWith 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.
- AssociationId string
- ID representing the association of the address with an instance in a VPC.
- CarrierIp string
- Carrier IP address.
- CustomerOwned stringIp 
- Customer owned IP.
- CustomerOwned 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.
- IpamPool stringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- NetworkBorder stringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- NetworkInterface string
- Network interface ID to associate with.
- PrivateDns string
- The Private DNS associated with the Elastic IP address (if in VPC).
- PrivateIp string
- Contains the private IP address (if in VPC).
- PtrRecord string
- The DNS pointer (PTR) record for the IP address.
- PublicDns string
- Public DNS associated with the Elastic IP address.
- PublicIp string
- Contains the public IP address.
- PublicIpv4Pool 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_tagsconfiguration 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_tagsconfiguration block.
- Vpc bool
- Boolean if the EIP is in a VPC or not. Use - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- allocationId String
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- associateWith 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.
- associationId String
- ID representing the association of the address with an instance in a VPC.
- carrierIp String
- Carrier IP address.
- customerOwned StringIp 
- Customer owned IP.
- customerOwned 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.
- ipamPool StringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- networkBorder StringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- networkInterface String
- Network interface ID to associate with.
- privateDns String
- The Private DNS associated with the Elastic IP address (if in VPC).
- privateIp String
- Contains the private IP address (if in VPC).
- ptrRecord String
- The DNS pointer (PTR) record for the IP address.
- publicDns String
- Public DNS associated with the Elastic IP address.
- publicIp String
- Contains the public IP address.
- publicIpv4Pool 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_tagsconfiguration 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_tagsconfiguration block.
- vpc Boolean
- Boolean if the EIP is in a VPC or not. Use - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- allocationId string
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn string
- associateWith 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.
- associationId string
- ID representing the association of the address with an instance in a VPC.
- carrierIp string
- Carrier IP address.
- customerOwned stringIp 
- Customer owned IP.
- customerOwned 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.
- ipamPool stringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- networkBorder stringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- networkInterface string
- Network interface ID to associate with.
- privateDns string
- The Private DNS associated with the Elastic IP address (if in VPC).
- privateIp string
- Contains the private IP address (if in VPC).
- ptrRecord string
- The DNS pointer (PTR) record for the IP address.
- publicDns string
- Public DNS associated with the Elastic IP address.
- publicIp string
- Contains the public IP address.
- publicIpv4Pool 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_tagsconfiguration 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_tagsconfiguration block.
- vpc boolean
- Boolean if the EIP is in a VPC or not. Use - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- ipam_pool_ strid 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- 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_tagsconfiguration 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_tagsconfiguration block.
- vpc bool
- Boolean if the EIP is in a VPC or not. Use - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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.
- allocationId String
- ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- arn String
- associateWith 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.
- associationId String
- ID representing the association of the address with an instance in a VPC.
- carrierIp String
- Carrier IP address.
- customerOwned StringIp 
- Customer owned IP.
- customerOwned 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.
- ipamPool StringId 
- The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
- networkBorder StringGroup 
- Location from which the IP address is advertised. Use this parameter to limit the address to this location.
- networkInterface String
- Network interface ID to associate with.
- privateDns String
- The Private DNS associated with the Elastic IP address (if in VPC).
- privateIp String
- Contains the private IP address (if in VPC).
- ptrRecord String
- The DNS pointer (PTR) record for the IP address.
- publicDns String
- Public DNS associated with the Elastic IP address.
- publicIp String
- Contains the public IP address.
- publicIpv4Pool 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_tagsconfiguration 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_tagsconfiguration block.
- vpc Boolean
- Boolean if the EIP is in a VPC or not. Use - domaininstead. Defaults to- trueunless the region supports EC2-Classic.- NOTE: You can specify either the - instanceID or the- network_interfaceID, 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_pooland- addresswon't cause an error but- addresswill 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 awsTerraform Provider.