Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.equinix.dev/llms.txt

Use this file to discover all available pages before exploring further.

The official provider is equinix/equinix — version ~> 4.15 at the time of this writing.

Minimum config

terraform {
  required_providers {
    equinix = {
      source  = "equinix/equinix"
      version = "~> 4.15"
    }
  }
}

provider "equinix" {
  client_id     = var.equinix_client_id
  client_secret = var.equinix_client_secret
}
equinix-dev compile always emits this block at the top of main.tf.

Authentication modes

The provider supports two auth modes. equinix.dev defaults to OAuth 2.0 client credentials for everything except Metal.
Equinix Metal uses a separate auth header. If you’re targeting Metal alongside Fabric, set both:
provider "equinix" {
  client_id     = var.equinix_client_id
  client_secret = var.equinix_client_secret
  auth_token    = var.equinix_metal_auth_token  # METAL_AUTH_TOKEN env var
}
Equinix Metal is in maintenance mode following the Packet acquisition wind-down. Check the status of any Metal-only workflow before building on it.

Environment variables

VariablePurpose
EQUINIX_CLIENT_IDOAuth 2.0 client ID
EQUINIX_CLIENT_SECRETOAuth 2.0 client secret
EQUINIX_ACCOUNT_NUMBERRequired for Fabric Cloud Router and Network Edge resources (the customer-facing account number, distinct from the OAuth app ID)
METAL_AUTH_TOKENEquinix Metal API token (Metal only)
EQUINIX_API_ENDPOINTOverride for sandbox or staging Equinix portals (default: https://api.equinix.com)
equinix-dev add writes the first three to .env.local automatically.

Retry and timeout knobs

Default behavior is reasonable, but for CI or noisy networks you may want to bump:
provider "equinix" {
  client_id     = var.equinix_client_id
  client_secret = var.equinix_client_secret
  request_timeout = 60   # seconds; default 30
  max_retries     = 5    # default 3
  retry_wait_min  = 5    # seconds; default 2
  retry_wait_max  = 60   # seconds; default 30
}

Multi-region Fabric

If your plan touches multiple Equinix metros, you don’t need multiple provider blocks — Fabric resources accept a metro_code parameter and the same provider block routes correctly. This differs from AWS / Azure / GCP, where regional provider aliasing is the norm.
# Both routers use the same provider block. metro_code is per-resource.
resource "equinix_fabric_cloud_router" "fcr_iad" {
  name     = "fcr-iad"
  location { metro_code = "DC" }
}

resource "equinix_fabric_cloud_router" "fcr_dfw" {
  name     = "fcr-dfw"
  location { metro_code = "DA" }
}

Common pitfalls

Most Fabric resources require an account_number — the customer-facing billing identifier from the Equinix portal. It’s distinct from the OAuth client ID and is not injected automatically. equinix.dev sets it from EQUINIX_ACCOUNT_NUMBER.
resource "equinix_fabric_cloud_router" "this" {
  account = { account_number = var.equinix_account_number }
}
Symptom of missing it: "account_number must be specified" at plan time.
data "equinix_fabric_service_profiles" only returns profiles your account has visibility on. Some partner profiles (Lambda, certain neoclouds) require an explicit access grant first. If data.*.data is empty, request access via the Equinix portal or the partner’s onboarding form.
Some Fabric resources mutate their fields server-side on creation (UUIDs, change logs, account references). Set lifecycle { ignore_changes = [account, change_log] } if these cause a diff in subsequent plans.
The equinix_network_device resource references SSH keys by key_name, not by content. Upload the public key to the Equinix portal first; only then will the resource resolve.

Next

Modules

When to use terraform-equinix-fabric instead of raw resources.

Resources index

Every equinix_* resource we wrap, alphabetical.