Skip to content

Terraform module to provision CDN resources in Edgecenter.

License

Notifications You must be signed in to change notification settings

No0key/terraform-edgecenter-cdn

Repository files navigation

terraform-edgecenter-cdn

Terraform module to provision CDN resources in Edgecenter.

Requirements

Name Version
terraform >= 1.3.0
edgecenter 0.7.3

Providers

Name Version
edgecenter 0.7.3

Modules

No modules.

Resources

Name Type
edgecenter_cdn_origingroup.main resource
edgecenter_cdn_resource.main resource
edgecenter_cdn_sslcert.main resource

Inputs

Name Description Type Default Required
origin_groups Origin group definition for CDN
object({
name = string
use_next = bool
origins = list(object({
source = string
enabled = bool
}))
})
n/a yes
resource_options The options for the CDN resource
object({
allowed_http_methods = object({ value = set(string), enabled = optional(bool) })
brotli_compression = object({ value = set(string), enabled = optional(bool) })
browser_cache_settings = object({ enabled = optional(bool), value = optional(string) })
cache_http_headers = object({ value = set(string), enabled = optional(bool) })
cors = object({ value = set(string), always = optional(bool), enabled = optional(bool, false) })
country_acl = object({ excepted_values = set(string), policy_type = string, enabled = optional(bool) })
disable_proxy_force_ranges = object({ value = bool, enabled = optional(bool) })
edge_cache_settings = object({ custom_values = optional(map(string)), default = optional(string), enabled = optional(bool), value = optional(string) })
fetch_compressed = object({ value = bool, enabled = optional(bool) })
follow_origin_redirect = object({ codes = set(number), enabled = optional(bool), use_host = optional(bool) })
force_return = object({ code = number, body = optional(string), enabled = optional(bool) })
forward_host_header = object({ value = bool, enabled = optional(bool) })
gzip_on = object({ value = bool, enabled = optional(bool) })
host_header = object({ value = string, enabled = optional(bool) })
ignore_cookie = object({ value = bool, enabled = optional(bool) })
ignore_query_string = object({ value = bool, enabled = optional(bool) })
image_stack = object({ quality = number, avif_enabled = optional(bool), enabled = optional(bool), png_lossless = optional(bool), webp_enabled = optional(bool) })
ip_address_acl = object({ excepted_values = set(string), policy_type = string, enabled = optional(bool) })
limit_bandwidth = object({ limit_type = string, buffer = optional(number), enabled = optional(bool), speed = optional(number) })
proxy_cache_methods_set = object({ value = bool, enabled = optional(bool) })
query_params_blacklist = object({ value = set(string), enabled = optional(bool) })
query_params_whitelist = object({ value = set(string), enabled = optional(bool) })
redirect_http_to_https = object({ value = bool, enabled = optional(bool) })
redirect_https_to_http = object({ value = bool, enabled = optional(bool) })
referrer_acl = object({ excepted_values = set(string), policy_type = string, enabled = optional(bool) })
response_headers_hiding_policy = object({ excepted = set(string), mode = string, enabled = optional(bool) })
rewrite = object({ body = string, enabled = optional(bool), flag = optional(string) })
secure_key = object({ key = string, type = number, enabled = optional(bool) })
slice = object({ value = bool, enabled = optional(bool) })
sni = object({ custom_hostname = optional(string), enabled = optional(bool), sni_type = optional(string) })
stale = object({ value = set(string), enabled = optional(bool) })
static_headers = object({ value = map(string), enabled = optional(bool) })
static_request_headers = object({ value = map(string), enabled = optional(bool) })
static_response_headers = object({ value = list(object({ name = string, value = set(string), always = optional(bool) })), enabled = optional(bool) })
user_agent_acl = object({ excepted_values = set(string), policy_type = string, enabled = optional(bool) })
websockets = object({ value = bool, enabled = optional(bool) })
})
{
"allowed_http_methods": {
"enabled": false,
"value": [
"GET",
"HEAD"
]
},
"brotli_compression": {
"enabled": false,
"value": [
""
]
},
"browser_cache_settings": {
"enabled": false,
"value": ""
},
"cache_http_headers": {
"enabled": false,
"value": []
},
"cors": {
"always": false,
"enabled": false,
"value": []
},
"country_acl": {
"enabled": false,
"excepted_values": [],
"policy_type": ""
},
"disable_proxy_force_ranges": {
"enabled": false,
"value": false
},
"edge_cache_settings": {
"custom_values": {},
"default": "2d",
"enabled": true,
"value": ""
},
"fetch_compressed": {
"enabled": false,
"value": false
},
"follow_origin_redirect": {
"codes": [],
"enabled": false,
"use_host": false
},
"force_return": {
"body": "",
"code": 0,
"enabled": false
},
"forward_host_header": {
"enabled": false,
"value": false
},
"gzip_on": {
"enabled": false,
"value": false
},
"host_header": {
"enabled": false,
"value": ""
},
"ignore_cookie": {
"enabled": false,
"value": false
},
"ignore_query_string": {
"enabled": false,
"value": false
},
"image_stack": {
"avif_enabled": false,
"enabled": false,
"png_lossless": false,
"quality": 0,
"webp_enabled": false
},
"ip_address_acl": {
"enabled": false,
"excepted_values": [],
"policy_type": ""
},
"limit_bandwidth": {
"buffer": 0,
"enabled": false,
"limit_type": "",
"speed": 0
},
"proxy_cache_methods_set": {
"enabled": false,
"value": false
},
"query_params_blacklist": {
"enabled": false,
"value": []
},
"query_params_whitelist": {
"enabled": false,
"value": []
},
"redirect_http_to_https": {
"enabled": false,
"value": false
},
"redirect_https_to_http": {
"enabled": false,
"value": false
},
"referrer_acl": {
"enabled": false,
"excepted_values": [],
"policy_type": ""
},
"response_headers_hiding_policy": {
"enabled": false,
"excepted": [],
"mode": ""
},
"rewrite": {
"body": "",
"enabled": false,
"flag": ""
},
"secure_key": {
"enabled": false,
"key": "",
"type": 0
},
"slice": {
"enabled": false,
"value": false
},
"sni": {
"custom_hostname": "",
"enabled": false,
"sni_type": ""
},
"stale": {
"enabled": false,
"value": []
},
"static_headers": {
"enabled": false,
"value": {}
},
"static_request_headers": {
"enabled": false,
"value": {}
},
"static_response_headers": {
"enabled": false,
"value": [
{
"always": false,
"name": "",
"value": []
}
]
},
"user_agent_acl": {
"enabled": false,
"excepted_values": [],
"policy_type": ""
},
"websockets": {
"enabled": false,
"value": false
}
}
no
resources CDN resource definition
map(object({
cname = string
active = bool
ssl_automated = optional(bool)
ssl_data = optional(number)
ssl_enabled = optional(bool)
description = optional(string)
issue_le_cert = optional(bool)
origin_group = optional(number)
secondary_hostnames = optional(set(string))
}))
n/a yes
ssl_certificate_fullchain SSL ceritificate full chain string "" no
ssl_certificate_name SSL certificate string "" no
ssl_certificate_private_key SSL certificate private key string "" no

Outputs

Name Description
edgecenter_cdn_origingroup_id The ID of the CDN Origin Group
edgecenter_cdn_resource_id The ID of the CDN Resource
edgecenter_cdn_ssl_certificate_id SSL certificate ID

About

Terraform module to provision CDN resources in Edgecenter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published