Skip to content
Odinex Cloud
Terraform providerReferenceResources

odinex_floating_ip

Manages a floating IP. Assign it with server_id or with odinex_floating_ip_assignment (not both).

Manages a floating IP. Assign it with server_id or with odinex_floating_ip_assignment (not both).

Example Usage

resource "odinex_floating_ip" "web" {
  type          = "ipv4"
  home_location = "fra1"
}

Schema

Required

  • type (String) ipv4 or ipv6.

Optional

  • delete_protection (Boolean) Prevent the resource from being deleted. Defaults to false.
  • description (String) Description of the floating IP.
  • home_location (String) Location of the floating IP. Required unless server_id is set.
  • labels (Map of String) User-defined labels (key/value pairs). Up to 64 pairs; keys and values up to 63 characters.
  • name (String) Name of the floating IP.
  • server_id (Number) Server the IP is assigned to.
  • timeouts (Block, Optional)

Read-Only

  • id (String) Unique ID of the resource.
  • ip_address (String) The IP address.

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.
  • 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).

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import odinex_floating_ip.web 8

On this page