Cloudflare zone maintenance page leveraging Cloudflare workers module with approve listing. Takes a simple number of variables as input along with a template to use to generate as HTML displayed to the user.
inspiration from https://github.com/adinhodovic/terraform-cloudflare-maintenance
The following requirements are needed by this module:
-
terraform (>= 0.13)
-
cloudflare (> 2.0.0)
The following providers are used by this module:
- cloudflare (> 2.0.0)
No modules.
The following resources are used by this module:
- cloudflare_worker_route.this (resource)
- cloudflare_worker_script.this (resource)
- cloudflare_zones.this (data source)
The following input variables are required:
Description: n/a
Type: string
Description: The Cloudflare worker name.
Type: string
Description: The DNS pattern list to deploy the maintenance page to.
Type: list(string)
Description: The Cloudflare worker html template that should be displayed (e.g. <!doctype html>......).
Type: string
The following input variables are optional (have default values):
Description: The IPs that are allowed to bypass the maintenance page.
Type: string
Default: "placeholder"
Description: Flag to create/delete the worker route.
Type: bool
Default: true
Description: URL to redirect traffic to. Uses var.http_status_code and supersedes var.body.
Type: string
Default: ""
Description: Whether to return a 200 status code with templated response.
Type: bool
Default: false`
No outputs.