Terraform provider reference / resources / project
fiberax_project (Resource)
A Virtual Data Center project of your account. Needs an account key (client area, API tokens, Account keys); a project key answers account_key_required.
Ordering is free: you pay for what you create inside the project. A new project is ready within seconds; the provider waits until it is active. An account holds up to 10 projects (partners more), counting the ones ordered in the client area.
Only an EMPTY project is deleted: no servers or routers, no public IP addresses, no private networks besides the default one, no ISO images or server images of your own. Otherwise destroy stops with the list of what is left, and nothing is closed. Closing is final; what the project ran up in the current period is invoiced when it closes.
To work inside the project, give the account key a provider configuration with project_id set to this project's id (an alias per project). That id must be known when the plan starts: create the project in a run of its own (terraform apply -target=...) or in a configuration of its own. Resources inside the project are not linked to it by project_id: in one configuration give them depends_on = [fiberax_project.<name>], so that destroy removes them before it closes the project.
Example Usage
# A Virtual Data Center project, ordered with an ACCOUNT KEY (client area, API tokens,
# Account keys). Ordering is free: you pay for what you create inside the project.
provider "fiberax" {
alias = "account"
# token = "fbx_..." # the account key, better through FIBERAX_TOKEN
}
resource "fiberax_project" "acme" {
provider = fiberax.account
name = "acme-production"
labels = ["customer-1042"]
}
# Working INSIDE the project takes a provider configuration of its own with project_id.
# The id must be known when the plan starts: create the project first
# terraform apply -target=fiberax_project.acme
# and keep the id in a variable (or read it with the data source fiberax_projects).
variable "acme_project_id" {
type = number
}
provider "fiberax" {
alias = "acme"
project_id = var.acme_project_id
}
resource "fiberax_network" "acme_backend" {
provider = fiberax.acme
name = "backend"
cidr = "10.20.0.0/24"
# Destroy removes the network first: only an empty project is closed.
depends_on = [fiberax_project.acme]
}
Schema
Required
name(String) Name of the project, as the client area shows it: Latin letters, digits, space, dot, dash and underscore, up to 64 characters. Changed in place. Renaming is refused while the account has an unpaid invoice; changing onlylabelsis not.
Optional
labels(Set of String) Your labels, to find the project again - for example the id of your own customer. Not set - the provider leaves the labels alone; set - it brings their set to the one in the configuration; an empty list removes them all. Up to 10: Latin letters, digits, dot, dash and underscore, up to 50 characters each, not starting withhb-.
The platform compares labels case-insensitively and keeps one of two spellings, so a configuration with two spellings of one label (["acme", "Acme"]) is refused at plan time. The API returns labels sorted alphabetically without regard to letter case; order does not matter here (a set).
timeouts(Block, Optional) (see below for nested schema)
Read-Only
created_at(String) When the project was created (RFC 3339; the platform keeps the date).id(Number) ID of the project - the value forproject_idof a provider configuration.status(String)ActiveorSuspended(the account has an unpaid invoice past its due date);Pendingonly while a new project is being set up.
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:
# A project is imported by its ID, as listed by GET /v1/projects or the data source # fiberax_projects. Only an account key can import it. terraform import fiberax_project.acme 4711
Generated from the provider schema for version 0.11.0. How to install the provider: Terraform provider.