pulumi_wasm_providers_aws_mini::ec2

Module eip_association

source
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 or aws.ec2.NatGateway resources. Instead use the allocation_id available in those resources to allow AWS to manage the association, otherwise you will see AuthFailure 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§

Functions§

  • Registers a new resource with the given unique name and arguments