From Vibecoding to IaC

Start fast with the console or API, then export to Terraform when you're ready for production. This workflow lets you prototype quickly while maintaining the benefits of infrastructure as code.

The Workflow

  1. Prototype: Use the console or API to create checks quickly
  2. Validate: Confirm the checks work as expected
  3. Export: Generate Terraform configuration from your checks
  4. Commit: Check the Terraform into version control
  5. Manage: Future changes go through Terraform

Exporting Your Checks

# Export all checks in your organization
curl -X GET https://api.quismon.com/v1/terraform/export \
  -H "Authorization: Bearer $API_KEY" \
  -o quismon-checks.tf

This generates a Terraform file with all your checks, alert rules, and notification channels.

Example Export

# Generated by Quismon Terraform Export
# Run: terraform init && terraform apply

terraform {
  required_providers {
    quismon = {
      source  = "quismon/quismon"
      version = "~> 1.0"
    }
  }
}

provider "quismon" {
  api_key = var.quismon_api_key
}

resource "quismon_check" "api_health_abc123" {
  name     = "API Health"
  type     = "https"
  config   = jsonencode({
    url             = "https://api.example.com/health"
    expected_status = "200"
  })
  regions            = ["na-east-ewr", "eu-central-fra"]
  interval_seconds   = 60
  enabled            = true
}

Best Practices

  • Review before committing: The export may include test checks you want to remove
  • Use variables: Move sensitive values to Terraform variables
  • Organize: Split into multiple files for different services/environments
  • Don't re-import: Once in Terraform, manage through Terraform only

Handling Expiring Checks

The Terraform provider handles expiring checks specially:

  • Expiring checks are included in exports but won't cause Terraform drift
  • expires_after_seconds is read-only in Terraform
  • Use expiring checks for deployment verification, not permanent monitoring

See Also