### Create a pingvera_monitor resource Source: https://registry.terraform.io/providers/pingvera/pingvera/latest/docs/resources/pingvera_monitor Example Terraform configuration for creating an HTTP monitor. The `type` and `target` arguments force resource recreation when changed. The `config` argument is a JSON string compared semantically. ```hcl resource "pingvera_monitor" "example" { type = "http" name = "Основной сайт" target = "https://example.com" interval_s = 60 fail_threshold = 2 degraded_latency_ms = 800 tags = ["prod", "website"] config = jsonencode({ fail_on_4xx = true }) } ``` -------------------------------- ### Import an existing pingvera_monitor Source: https://registry.terraform.io/providers/pingvera/pingvera/latest/docs/resources/pingvera_monitor Command to import an existing monitor using its `public_id` (e.g., `mon_XXXXXXXXXXXX`), which is visible in the dashboard or via `GET /api/v1/monitors`. ```hcl terraform import pingvera_monitor.example mon_XXXXXXXXXXXX ``` -------------------------------- ### Resource: pingvera_monitor Source: https://registry.terraform.io/providers/pingvera/pingvera/latest/docs/resources/pingvera_monitor Terraform resource that manages a Pingvera monitor. It supports multiple monitor types and reflects operations to the hub API. ```APIDOC ## Resource: pingvera_monitor ### Description Manages a Pingvera monitor of type `http`, `tcp`, `dns`, `tls`, `heartbeat`, `wp`, `domain`, `links`, `rkn`, or `mail_loop`. Reflects `POST/PATCH/DELETE /api/v1/monitors` on the hub. ### Example ```hcl resource "pingvera_monitor" "example" { type = "http" name = "Основной сайт" target = "https://example.com" interval_s = 60 fail_threshold = 2 degraded_latency_ms = 800 tags = ["prod", "website"] config = jsonencode({ fail_on_4xx = true }) } ``` ### Arguments | Name | Type | Required | Description | |------|------|----------|-------------| | `type` | string | yes | `http`\|`tcp`\|`dns`\|`tls`\|`heartbeat`\|`wp`\|`domain`\|`links`\|`rkn`\|`mail_loop`. Changing this recreates the resource. | | `name` | string | yes | Human-readable name. | | `target` | string | yes | Target of the check. Changing this recreates the resource. | | `interval_s` | number | no | Check interval, 10..86400 seconds. If not set, server default by type/tariff. | | `fail_threshold` | number | no | Number of consecutive failures before incident, 1..10. Default 2. | | `degraded_latency_ms` | number | no | Latency threshold (ms) for `degraded` status. | | `enabled` | bool | no | Whether the monitor is enabled. Default `true`. | | `tags` | set(string) | no | Free-form labels. | | `config` | string (JSON) | no | Additional monitor settings as raw JSON. Comparison is semantic. | ### Read-Only Attributes - `id` — `public_id` of the monitor. ### Import ``` terraform import pingvera_monitor.example mon_XXXXXXXXXXXX ``` `mon_XXXXXXXXXXXX` — `public_id` of the monitor (visible in dashboard or via `GET /api/v1/monitors`). ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.