Getting Started

DE-CIX PDM Team Updated by DE-CIX PDM Team

Getting Started with the IX-API Terraform Provider

This guide explains how to install and configure the IX-API Terraform provider to manage your DE-CIX services.

Prerequisites

  • Terraform >= 1.0 — Download Terraform
  • DE-CIX IX-API credentials — either an API key and secret (legacy authentication) or OAuth2 client credentials (client ID and client secret). Contact your DE-CIX account team to obtain these.

Step 1 – Install the Provider

Create a main.tf file in a new directory and declare the provider requirement:

terraform {
required_providers {
ixapi = {
source = "registry.terraform.io/ix-api-net/ixapi"
version = "~> 1.0"
}
}
}

Run terraform init to download the provider:

$ terraform init

Step 2 – Configure Authentication

The provider supports the following authentication strategy: API key + secret.

Hint: How to request an API Key and an API Secret via the DE-CIX Portal

Authentication

provider "ixapi" {
api = "https://api.de-cix.net/api/v2"
api_key = var.api_key
api_secret = var.api_secret
}

We recommend storing credentials in environment variables rather than in your Terraform files:

Environment Variable

Description

IX_API_HOST

The IX-API endpoint URL

IX_API_KEY

Your API key

IX_API_SECRET

Your API secret

With environment variables set, the provider block can be simplified:

provider "ixapi" {}

Step 3 – Verify Your Setup

Use a data source to confirm the provider can authenticate and reach the API:

data "ixapi_accounts" "all" {}

output "accounts" {
value = data.ixapi_accounts.all.accounts
}

Run terraform apply and check the output. If your credentials are correct, Terraform lists the accounts associated with your API key. Note the account ID — you will use it as var.account_id in subsequent configurations.

Step 4 – Enable the Cloud ROUTER Extension

To use DE-CIX Cloud ROUTER resources, set the feature flag in the provider block:

provider "ixapi" {
api = "https://api.de-cix.net/api/v2"
api_key = var.api_key
api_secret = var.api_secret
extension_de_cix_cloud_router_enabled = true
}

Without this flag, all ixapi_de_cix_* resources and data sources are unavailable and will produce an error during terraform plan.

Next Steps

💡 Tip: If you're new to Terraform, AI assistants like Claude or GitHub Copilot can help you get started quickly. Try pasting this documentation into your AI tool of choice and describing what you want to build — many users find this significantly speeds up their first setup.

How did we do?

Terraform Provider Overview

Provider Configuration

Get in touch