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
- Log into your Status200 dashboard
- Go to Settings → About
- 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.123Provider Registry Information
- Registry URL: https://registry.terraform.io/providers/status200/status200
- Source Repository: https://github.com/Status200/terraform-provider-status200
- Documentation: https://registry.terraform.io/providers/status200/status200/latest/docs
- Releases: https://github.com/Status200/terraform-provider-status200/releases
Version Compatibility Matrix
| Status200 Version | Provider Version | Terraform Config |
|---|---|---|
| 7.0.x | 7.0.x | version = "~> 7.0.0" |
| 7.1.x | 7.1.x | version = "~> 7.1.0" |
| Latest Cloud | Latest Provider | version = "~> 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
- Create your Terraform configuration with the provider block
- Initialize Terraform:
terraform init - Set your API key: Create
terraform.tfvarswith your API key - Plan your deployment:
terraform plan - Apply your configuration:
terraform apply
Getting Help
- Full Documentation: See the complete Terraform documentation
- Self-Hosted Guide: Check the self-hosted configuration guide
- Examples: Browse configuration examples
- Quick Start: Follow the quick start guide
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.