Terraform provider reference / resources / ip

fiberax_ip (Resource)

A public IPv4 address of the project.

It is charged from the moment you take it until you release it, whether or not it sits on a server. It outlives the server and keeps costing money until it is released: deleting a server lists such addresses in a warning, but does not release them.

Where the address goes is not decided by this resource: the attachment lives in the server's network card (fiberax_network_interface, field ips) or is set when the server is created.

Example Usage

# A public address is a SEPARATE billable resource.
#
# It is charged from the moment you take it until you release it, whether or not it sits
# on a server: deleting a server does NOT release the address, it only lists such
# addresses in a warning.
resource "fiberax_ip" "web" {
  # The server type picks the POOL the address comes from. An address from another pool
  # is not routed on the server, and the platform cannot move an address once it has been
  # issued - so changing this field takes a NEW address in place of the old one.
  server_type_id = 4
}

# The address is attached to the server when the server is created...
resource "fiberax_server" "web" {
  name           = "web-01"
  server_type_id = 4
  image          = "fcf9f69c8630904c1d6d73a821f4e674"

  cores     = 2
  memory_mb = 2048
  disk_gb   = 20

  public_ipv4 = {
    id = fiberax_ip.web.id
  }
}

output "web_address" {
  value = fiberax_ip.web.address
}

Schema

Optional

This is not just an annotation but a CHOICE OF POOL: server types have different pools, and an address from another pool IS NOT ROUTED on the server. The platform cannot move an issued address to another pool, so changing this field recreates the resource - it releases the old address and takes a new one, with a different address value.

The field IS NOT READ BACK: the platform does not report the pool of an address. The provider keeps the value you asked for and does not reconcile it with the platform.

Read-Only

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# An existing address is imported by its ID. IDs are visible in the client area and in
# the response of GET /v1/ips.
terraform import fiberax_ip.web 108

# WHAT YOU HAVE TO WRITE BY HAND: the server type whose pool the address came from. The
# platform does not report the pool, so the provider neither knows it nor invents it.

Generated from the provider schema for version 0.3.0. How to install the provider: Terraform provider.