arvancloud_cdn_domain_active_health_check (Resource)
Domain's active health check.
Example Usage
resource "arvancloud_cdn_domain_load_balancer" "example" {
domain = "cdn-terraform.ir"
name = "from-terraform"
description = "An example load balancer"
status = true
method = "cluster_rr"
time_slice = "10s"
}
resource "arvancloud_cdn_domain_load_balancer_pool" "example" {
domain = arvancloud_cdn_domain_load_balancer.example.domain
load_balancer = arvancloud_cdn_domain_load_balancer.example.id
description = "Pool description"
status = true
priority = 0
method = "cluster_rr"
keepalive = "on"
regions = ["THR"]
next_upstream_tcp = "on"
next_upstream_codes = {
get = [500, 404]
head = [503]
options = [404],
delete = [502]
}
}
resource "arvancloud_cdn_domain_load_balancer_pool_origin" "first-origin" {
domain = arvancloud_cdn_domain_load_balancer_pool.example.domain
load_balancer = arvancloud_cdn_domain_load_balancer_pool.example.load_balancer
pool = arvancloud_cdn_domain_load_balancer_pool.example.id
status = true
address = "1.2.3.5"
port = 8085
weight = 1
protocol = "http"
host_header = ""
}
resource "arvancloud_cdn_domain_load_balancer_pool_origin" "second-origin" {
domain = arvancloud_cdn_domain_load_balancer_pool.example.domain
load_balancer = arvancloud_cdn_domain_load_balancer_pool.example.load_balancer
pool = arvancloud_cdn_domain_load_balancer_pool.example.id
status = true
address = "3.3.3.3"
port = 443
weight = 1
protocol = "http"
host_header = ""
}
resource "arvancloud_cdn_domain_active_health_check" "example" {
domain = arvancloud_cdn_domain_load_balancer_pool.example.domain
pool = arvancloud_cdn_domain_load_balancer_pool.example.id
depends_on = [arvancloud_cdn_domain_load_balancer_pool_origin.first-origin, arvancloud_cdn_domain_load_balancer_pool_origin.second-origin]
description = "New Desc"
interval = 60000
name = "pool-name"
request_config = {
http = {
allow_insecure = true
expected_response = {
body = "some body"
codes = [
200,
300
]
headers = {
key = [
"value"
],
what = [
"value"
]
}
},
headers = {
key = "value"
},
method = "GET"
path = "/path"
port = 801,
timeout = 15000
},
tcp = null
}
retries = 3
status = true
threshold = 1
type = "HTTP"
zones = [
{
id = "60cd5dc8-911e-11ed-9adb-9e3a26780618"
monitoring_level = "critical"
}
]
}
Schema
Required
description
(String) Description of the active health check.domain
(String) UUID or the name of the domain.interval
(Number) Interval between health checks in milliseconds.name
(String) Name of the active health check.pool
(String) UUID of the pool.request_config
(Attributes) Configuration for the health check request. (see below for nested schema)retries
(Number) Number of retries before marking the check as failed.status
(Boolean) Status of the active health check.threshold
(Number) Number of failed checks before marking the origin as unhealthy.type
(String) Type of the active health check (TCP, HTTP, HTTPS).zones
(Attributes List) List of zones to monitor. (see below for nested schema)