arvancloud_cdn_domain_page_rule (Resource)
Domain's page rule.
Example Usage
resource "arvancloud_cdn_domain_page_rule" "one" {
domain = "cdn-terraform.ir"
url = "from-terraform-1"
seq = 20
cache_level = "query_string"
cache_200 = "3h"
cache_any = "3h"
cache_browser = "3h"
cache_cookie = "what"
cache_args = true
cache_arg = "arg1"
cors_header = "header.com"
custom_host_header = "custom.com"
image_resize = {
status = "on"
height_by = "height"
width_by = "width"
mode = "long-side"
mode_by = "page_mode"
}
upstream_timeout = {
connect_timeout = 15
read_timeout = 200
send_timeout = 300
}
req_custom_headers = [
{
name = "ok"
value = "here"
}
]
res_custom_headers = [
{
name = "not"
value = "here"
}
]
req_hide_headers = [
"hide1"
]
res_hide_headers = [
"hide2"
]
acceleration = {
status = "on"
extensions = [
"jpeg",
"css"
]
}
}
resource "arvancloud_cdn_domain_page_rule" "two" {
domain = "cdn-terraform.ir"
url = "from-terraform-2"
seq = 30
slink_secret = "some-secret"
slink_md5 = [
"uri",
"expires"
]
slink_status = true
status = false
cache_device_type = true
cache_ignore_sc = true
cache_ignore_vary = true
cache_ignore_cc = true
}
resource "arvancloud_cdn_domain_page_rule" "three" {
domain = "cdn-terraform.ir"
url = "from-terraform-3"
seq = 40
redirect = {
enable = true
status_code = 302
url = "https://goinghome.ir"
}
}
resource "arvancloud_cdn_domain_page_rule" "ec" {
domain = "cdn-terraform.ir"
url = "from-terraform-ec"
seq = 100
edge_compute_id = "5a80f9d1-22d7-4296-b4f3-cc8e2d1618c4"
}
Schema
Required
domain(String) UUID or the name of the domain.seq(Number)url(String)
Optional
acceleration(Attributes) (see below for nested schema)cache_200(String)cache_any(String)cache_arg(String)cache_args(Boolean)cache_browser(String)cache_cookie(String)cache_device_type(Boolean)cache_ignore_cc(Boolean)cache_ignore_sc(Boolean)cache_ignore_vary(Boolean)cache_level(String)cors_header(String)custom_host_header(String)edge_compute_id(String)id(String) UUID of the rule.image_resize(Attributes) (see below for nested schema)is_protected(Boolean)load_balancer(String)redirect(Attributes) (see below for nested schema)req_custom_headers(List of Map of String)req_hide_headers(List of String)res_custom_headers(List of Map of String)res_hide_headers(List of String)rewrite_url(String)slink_md5(List of String)slink_secret(String, Sensitive)slink_status(Boolean)status(Boolean)upstream_timeout(Attributes) (see below for nested schema)
Read-Only
last_updated(String) Timestamp of the last Terraform update of the domain.
Nested Schema for acceleration
Required:
extensions(List of String) Acceleration extensions.status(String) Whether the acceleration is active or not.
Nested Schema for image_resize
Required:
height_by(String)mode(String) Whether the image resize is active or not.mode_by(String)status(String) Whether the image resize is active or not.width_by(String)
Nested Schema for redirect
Required:
enable(Boolean)status_code(Number)url(String)
Nested Schema for upstream_timeout
Required:
connect_timeout(Number)read_timeout(Number)send_timeout(Number)
Import
Import is supported using the following syntax:
terraform import arvancloud_cdn_domain_page_rule.example cdn-terraform.ir,1a700f5a-acef-4786-9192-4960dcf18449