Skip to content

aws.ec2-eip resource

Description

Eip is an Elastic IP allocation: a public IPv4 address that EC2 reserves for an account through AllocateAddress and releases through ReleaseAddress. This construct covers allocation only; associating the address with an instance or network interface is a separate concern. Every allocation input is fixed when the address is allocated -- the address to recover, the network, an IPAM pool, a network border group, and the public or customer-owned pool to draw from -- so a change to any of them allocates a new address. Tags are the one input reconciled in place. The network border group is also threaded into the release call, since EC2 needs it to release an address scoped to a location.

Source: internal/service/ec2/eip_rsrc.go:30

Example usage:

imports: {
  aws: 'github.com/cloudboss/unobin-library-aws'
}

resources: {
  example: aws.ec2-eip {
    # Set input fields here.
  }
}

Inputs

address

optional(string)

domain

optional(string)

ipam-pool-id

optional(string)

network-border-group

optional(string)

public-ipv4-pool

optional(string)

customer-owned-ipv4-pool

optional(string)

tags

map(string)

Input Constraints

Domain rules

domain must be vpc or standard.

Rule logic
When
input.domain != null
Require
input.domain == 'vpc'
|| input.domain == 'standard'

Outputs

allocation-id

string

public-ip

string

association-id

string

private-ip

string