terraform-provider-towerops/examples/resources/towerops_check/resource.tf
Graham McIntire b922dbda22
refactor: remove device_role_source field
- Removed DeviceRoleSource field from Device struct and DeviceResourceModel
- Updated device_role description to reflect default value "other"
- Device role is now optional and defaults to "other" if not specified
- Cleaned up all CRUD operations to remove device_role_source handling

All device types are now manually selected with "other" as default.
2026-03-22 11:20:04 -05:00

31 lines
782 B
HCL

# HTTP health check
resource "towerops_check" "web_health" {
name = "Web Health Check"
check_type = "http"
url = "https://example.com/health"
expected_status = 200
content_match = "\"status\":\"ok\""
}
# TCP port check
resource "towerops_check" "radius_port" {
name = "FreeRADIUS Auth Port"
check_type = "tcp"
host = "10.0.0.5"
port = 1812
}
# DNS resolution check (uses device IP as DNS server when device_id is set)
resource "towerops_check" "dns_resolution" {
name = "DNS Resolution"
check_type = "dns"
hostname = "google.com"
record_type = "A"
}
# Ping check
resource "towerops_check" "gateway_ping" {
name = "Gateway Reachability"
check_type = "ping"
host = "10.0.0.1"
}