Expand description
Provides an AWS EIP Association as a top level resource, to associate and disassociate Elastic IPs from AWS Instances and Network Interfaces.
NOTE: Do not use this resource to associate an EIP to
aws.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.
NOTE:
aws.ec2.EipAssociation
is useful in scenarios where EIPs are either pre-existing or distributed to customers or users and therefore cannot be changed.
§Example Usage
resources:
eipAssoc:
type: aws:ec2:EipAssociation
name: eip_assoc
properties:
instanceId: ${web.id}
allocationId: ${example.id}
web:
type: aws:ec2:Instance
properties:
ami: ami-21f78e11
availabilityZone: us-west-2a
instanceType: t2.micro
tags:
Name: HelloWorld
example:
type: aws:ec2:Eip
properties:
domain: vpc
§Import
Using pulumi import
, import EIP Assocations using their association IDs. For example:
$ pulumi import aws:ec2/eipAssociation:EipAssociation test eipassoc-ab12c345
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments