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

Optional

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

Read-Only

Nested Schema for timeouts

Optional:

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.