We recommend new projects start with resources from the AWS provider.
aws-native.ec2.EipAssociation
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Associates an Elastic IP address with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account. For more information about working with Elastic IP addresses, see Elastic IP address concepts and rules.
You must specify AllocationId
and either InstanceId
, NetworkInterfaceId
, or PrivateIpAddress
.
Create EipAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EipAssociation(name: string, args?: EipAssociationArgs, opts?: CustomResourceOptions);
@overload
def EipAssociation(resource_name: str,
args: Optional[EipAssociationArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def EipAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
allocation_id: Optional[str] = None,
eip: Optional[str] = None,
instance_id: Optional[str] = None,
network_interface_id: Optional[str] = None,
private_ip_address: Optional[str] = None)
func NewEipAssociation(ctx *Context, name string, args *EipAssociationArgs, opts ...ResourceOption) (*EipAssociation, error)
public EipAssociation(string name, EipAssociationArgs? args = null, CustomResourceOptions? opts = null)
public EipAssociation(String name, EipAssociationArgs args)
public EipAssociation(String name, EipAssociationArgs args, CustomResourceOptions options)
type: aws-native:ec2:EipAssociation
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 EipAssociationArgs
- 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 EipAssociationArgs
- 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 EipAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EipAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EipAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
EipAssociation 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 EipAssociation resource accepts the following input properties:
- Allocation
Id string - The allocation ID. This is required.
- Eip string
- Instance
Id string - The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
- Network
Interface stringId - The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
- Private
Ip stringAddress - The 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.
- Allocation
Id string - The allocation ID. This is required.
- Eip string
- Instance
Id string - The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
- Network
Interface stringId - The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
- Private
Ip stringAddress - The 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.
- allocation
Id String - The allocation ID. This is required.
- eip String
- instance
Id String - The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
- network
Interface StringId - The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
- private
Ip StringAddress - The 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.
- allocation
Id string - The allocation ID. This is required.
- eip string
- instance
Id string - The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
- network
Interface stringId - The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
- private
Ip stringAddress - The 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.
- allocation_
id str - The allocation ID. This is required.
- eip str
- instance_
id str - The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
- network_
interface_ strid - The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
- private_
ip_ straddress - The 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.
- allocation
Id String - The allocation ID. This is required.
- eip String
- instance
Id String - The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
- network
Interface StringId - The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
- private
Ip StringAddress - The 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the EipAssociation resource produces the following output properties:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.