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 (inet4orinet6; default:inet4).description(String) A free-form text describing the Elastic IP (EIP).healthcheck(Block List, Max: 1) Healthcheck configuration for managed EIPs. It can not be added to an existing Unmanaged EIP. (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,httporhttps; may only be set at creation time).port(Number) The healthcheck target port (must be between1and65535).
Optional:
interval(Number) The healthcheck interval (seconds; must be between5and300; default:10).strikes_fail(Number) The number of failed healthcheck attempts before considering the target unhealthy (must be between1and20; default:2).strikes_ok(Number) The number of successful healthcheck attempts before considering the target healthy (must be between1and20; default:3).timeout(Number) The time before considering a healthcheck probing failed (seconds; must be between2and60; default:3).tls_skip_verify(Boolean) Disable TLS certificate verification for healthcheck inhttpsmode (boolean; default:false).tls_sni(String) The healthcheck server name to present with SNI inhttpsmode.uri(String) The healthcheck target URI (required inhttp(s)modes).
Nested Schema for timeouts
Optional:
create(String)delete(String)read(String)update(String)
-> 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