Class Eip
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var lb = new Aws.Ec2.Eip("lb", new Aws.Ec2.EipArgs
{
Instance = aws_instance.Web.Id,
Vpc = true,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class Eip : CustomResource
Constructors
View SourceEip(String, EipArgs, CustomResourceOptions)
Create a Eip resource with the given unique name, arguments, and options.
Declaration
public Eip(string name, EipArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| EipArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAllocationId
Declaration
public Output<string> AllocationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AssociateWithPrivateIp
A 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.
Declaration
public Output<string> AssociateWithPrivateIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AssociationId
Declaration
public Output<string> AssociationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CustomerOwnedIp
Customer owned IP.
Declaration
public Output<string> CustomerOwnedIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CustomerOwnedIpv4Pool
The ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide
Declaration
public Output<string> CustomerOwnedIpv4Pool { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Domain
Declaration
public Output<string> Domain { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Instance
EC2 instance ID.
Declaration
public Output<string> Instance { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NetworkInterface
Network interface ID to associate with.
Declaration
public Output<string> NetworkInterface { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrivateDns
The Private DNS associated with the Elastic IP address (if in VPC).
Declaration
public Output<string> PrivateDns { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrivateIp
Contains the private IP address (if in VPC).
Declaration
public Output<string> PrivateIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PublicDns
Public DNS associated with the Elastic IP address.
Declaration
public Output<string> PublicDns { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PublicIp
Contains the public IP address.
Declaration
public Output<string> PublicIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PublicIpv4Pool
EC2 IPv4 address pool identifier or amazon. This option is only available for VPC EIPs.
Declaration
public Output<string> PublicIpv4Pool { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Vpc
Boolean if the EIP is in a VPC or not.
Declaration
public Output<bool> Vpc { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Methods
View SourceGet(String, Input<String>, EipState, CustomResourceOptions)
Get an existing Eip resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Eip Get(string name, Input<string> id, EipState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| EipState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Eip |