Skip to content

exoscale_elastic_ip (Resource)

Manage Exoscale Elastic IPs (EIP).

Corresponding data source: exoscale_elastic_ip.

Example Usage

Unmanaged EIPv4:

resource "exoscale_elastic_ip" "my_elastic_ip" {
  zone = "ch-gva-2"
}

Managed EIPv6:

resource "exoscale_elastic_ip" "my_managed_elastic_ip" {
  zone = "ch-gva-2"
  address_family = "inet6"
  reverse_dns = "example.net"

  healthcheck = {
    mode         = "https"
    port         = 443
    uri          = "/health"
    interval     = 5
    timeout      = 3
    strikes_ok   = 2
    strikes_fail = 3
    tls_sni      = "example.net"
  }
}

Please refer to the examples directory for complete configuration examples.

Schema

Required

  • zone (String) ❗ The Exoscale Zone name.

Optional

  • address_family (String) ❗ The Elastic IP (EIP) address family (inet4 or inet6; default: inet4).
  • description (String) A free-form text describing the Elastic IP (EIP).
  • healthcheck (Attributes) Healthcheck configuration for managed EIPs. ❗ Adding it to or removing it from an existing EIP forces the creation of a new resource (an unmanaged EIP can not become managed and vice versa). (see below for nested schema)
  • labels (Map of String) A map of key/value labels.
  • reverse_dns (String) Domain name for reverse DNS record.
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only

  • cidr (String) The Elastic IP (EIP) CIDR.
  • id (String) The ID of this resource.
  • ip_address (String) The Elastic IP (EIP) IPv4 or IPv6 address.

Nested Schema for healthcheck

Required:

  • mode (String) The healthcheck mode (tcp, http or https; may only be set at creation time).
  • port (Number) The healthcheck target port (must be between 1 and 65535).

Optional:

  • interval (Number) The healthcheck interval (seconds; must be between 5 and 300; default: 10).
  • strikes_fail (Number) The number of failed healthcheck attempts before considering the target unhealthy (must be between 1 and 20; default: 2).
  • strikes_ok (Number) The number of successful healthcheck attempts before considering the target healthy (must be between 1 and 20; default: 3).
  • timeout (Number) The time before considering a healthcheck probing failed (seconds; must be between 2 and 60; default: 3).
  • tls_skip_verify (Boolean) Disable TLS certificate verification for healthcheck in https mode (boolean; default: false).
  • tls_sni (String) The healthcheck server name to present with SNI in https mode.
  • uri (String) The healthcheck target URI (required in http(s) modes).

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • read (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

Import

An existing Elastic IP (EIP) may be imported by <ID>@<zone>:

terraform import \
  exoscale_elastic_ip.my_elastic_ip \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2
Last updated on