Black Friday tra 20 giorni: i Suoi clienti potranno pagare? -25 % il 1° anno e configurazione offerta, fino al 30 novembreVedi l’offerta →

Integrazione

Terraform e OpenTofu per Pathly

Provider pathlyhq/pathly: scenari, webhook, manutenzione e SLA come codice.

Ottenere la mia chiave APIContratto OpenAPI

Documento completo, senza autenticazione, da passare al Suo generatore di client.

Terraform e OpenTofu

Provider ufficiale pathlyhq/pathly sul registro HashiCorp, compatibile con OpenTofu. Risorse: pathly_scenario (Ping tramite url, Chain tramite http_chain, Flow tramite steps), pathly_webhook, pathly_maintenance_window, pathly_sla_target. Autenticazione solo tramite PATHLY_API_TOKEN nell’ambiente, mai in un file .tf.

Import nativo per adottare un parco creato nella console, poi una sola fonte di verità. Ambiti consigliati per apply: scenarios:write alerting:write maintenance:write sla:write; per plan: i corrispondenti :read.

provider + Ping + Chain

terraform {
  required_providers {
    pathly = {
      source  = "pathlyhq/pathly"
      version = "~> 0.1"
    }
  }
}

provider "pathly" {}

resource "pathly_scenario" "checkout" {
  name         = "Checkout"
  url          = "https://www.example.com/cart"
  interval_sec = 300
  expect_text  = "Your cart"
  severity     = "critical"
}

resource "pathly_scenario" "api_me" {
  name         = "Login then /me"
  interval_sec = 300
  http_chain = [
    {
      name          = "Login"
      method        = "POST"
      url           = "https://api.example.com/login"
      assert_status = 200
    },
    {
      name          = "Me"
      method        = "GET"
      url           = "https://api.example.com/me"
      assert_status = 200
    },
  ]
}

import di uno scenario esistente

terraform import pathly_scenario.checkout scn_…