Terraform Provider

Terraform Provider Installation and Usage Guide

Installation from Terraform Registry

The Status200 Terraform Provider is available on the official Terraform Registry.

For Status200 Cloud Users

terraform {
  required_providers {
    status200 = {
      source  = "status200/status200"
      version = "~> 7.0"  # Use latest compatible version
    }
  }
  required_version = ">= 1.0"
}

provider "status200" {
  status200_url = "https://status200.ru"
  api_key       = var.status200_api_key
}

For Self-Hosted Status200 Users

⚠️ Critical: Self-hosted customers must pin the provider version to match their Status200 installation exactly.

terraform {
  required_providers {
    status200 = {
      source  = "status200/status200"
      version = "= 7.0.123"  # Replace with your exact Status200 version
    }
  }
  required_version = ">= 1.0"
}

provider "status200" {
  status200_url = "https://status200.yourcompany.com"  # Your self-hosted URL
  api_key       = var.status200_api_key
}

Why Version Pinning for Self-Hosted?

The Status200 Terraform provider is automatically generated from the Status200 API specification. Each Status200 version may have:

  • Different API endpoints
  • Updated resource schemas
  • New or removed features
  • Changed validation rules

Using a provider version that doesn't match your Status200 installation can result in:

  • API compatibility errors
  • Failed resource creation/updates
  • Unexpected behavior
  • Resource state drift

Finding Your Status200 Version

Method 1: Dashboard

  1. Log into your Status200 dashboard
  2. Go to SettingsAbout
  3. Note the version number (e.g., "7.0.123")

Method 2: API

curl https://your-status200-instance.com/api/status | jq '.version'

Method 3: Docker

docker images | grep status200
# Look for the tag, e.g., status200/dashboard:7.0.123

Provider Registry Information

Version Compatibility Matrix

Status200 VersionProvider VersionTerraform Config
7.0.x7.0.xversion = "~> 7.0.0"
7.1.x7.1.xversion = "~> 7.1.0"
Latest CloudLatest Providerversion = "~> 7.0"

Quick Start Example

# Configure the provider
terraform {
  required_providers {
    status200 = {
      source  = "status200/status200"
      version = "~> 7.0"  # Adjust for self-hosted
    }
  }
}

provider "status200" {
  status200_url = "https://status200.ru"  # Adjust for self-hosted
  api_key       = var.status200_api_key
}

# Create a project
resource "status200_project" "example" {
  name        = "Terraform Example"
  description = "Created with Terraform"
}

# Create a website monitor
resource "status200_monitor" "website" {
  name       = "Website Monitor"
  project_id = status200_project.example.id
  
  monitor_type = "website"
  url          = "https://example.com"
  interval     = "5m"
  
  tags = {
    managed_by = "terraform"
  }
}

Installation Steps

  1. Create your Terraform configuration with the provider block
  2. Initialize Terraform: terraform init
  3. Set your API key: Create terraform.tfvars with your API key
  4. Plan your deployment: terraform plan
  5. Apply your configuration: terraform apply

Getting Help

Registry Updates

The provider is automatically published to the Terraform Registry when new Status200 versions are released. Cloud users can use semantic versioning (~> 7.0) to automatically get compatible updates, while self-hosted users should pin to exact versions.