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 v1.0 or later

- DE-CIX IX-API credentials (API key and secret or OAuth2 client credentials)

Step 1 – Install the Provider

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

Initialize Terraform:

terraform init

Step 2 – Configure Authentication

Legacy Authentication

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

OAuth2 Authentication

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

Step 3 – Verify the Setup

data "ixapi_accounts" "all" {}

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

Run:

terraform apply

Step 4 – Enable the Cloud ROUTER Extension

provider "ixapi" {
extension_de_cix_cloud_router_enabled = true
}

This enables Cloud ROUTER resources and data sources.

Next Steps

  • Provider Configuration
  • Creating and Managing Services
  • Terraform State Management

How did we do?

Terraform Provider Overview

Provider Configuration

Get in touch