Terraform provider reference / resources / network
fiberax_network (Resource)
A private network inside the project. Servers on it talk to each other regardless of which server type they run on.
Network operations take about two minutes. The network is rolled out across every location of the project at once, so creating, changing and deleting it are asynchronous - this is a property of the platform, not slowness of the provider.
The name must be unique within the project. The create response carries no ID: the network record appears inside a background task, and the provider waits and finds its own network by name.
A server is attached to the network when it is created - through the networks field of fiberax_server.
Example Usage
# A private network of the project. Servers attach to it with network cards.
#
# Creating, changing and deleting a network all run as BACKGROUND tasks: the network is
# rolled out across all the project's locations at once, and takes about two minutes.
resource "fiberax_network" "backend" {
name = "backend"
cidr = "10.20.0.0/24"
}
# A network is changed in place, without being recreated. But the SUBNET can only be
# changed while nothing is attached to the network - otherwise the platform refuses.
resource "fiberax_network" "storage" {
name = "storage"
cidr = "10.21.0.0/24"
}
Schema
Required
cidr(String) Subnet in CIDR form, for example10.0.0.0/24.
The subnet can only be changed on a FREE network: while servers are attached to it or a router serves it, the platform refuses the change. The provider says so while the plan is being built, not after it has touched the network.
name(String) Your name for the network, unique within the project. Latin letters, digits, a space and. _ -are allowed, no longer than 30 characters.
Renaming happens in place and does not touch the servers, but takes the same two minutes.
Optional
timeouts(Block, Optional) (see below for nested schema)
Read-Only
id(Number) ID of the network. The same value goes into thenetworksfield when creating a server.is_default(Boolean) The network created with the project. It cannot be deleted, and a second one like it cannot be created through the API either.router(Attributes) The router serving this network: it hands out addresses on it, routes traffic out and holds the access rules. Null when no router serves this network.
The field is READ-ONLY. A router gets onto a network in two ways: the base network is set when the router itself is created (the networks field of its server), the rest are attached by an API operation. (see below for nested schema)
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).
Nested Schema for router
Read-Only:
interface(String) Router interface facing this network, in the router's own form (eth2).name(String)server_id(Number) ID of the router server.status(String)
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import fiberax_network.backend 538
Generated from the provider schema for version 0.3.0. How to install the provider: Terraform provider.