maintenance

adinhodovic/maintenance/cloudflare

Terraform Module HCL CLOUDFLARE

Terraform module to create a responsive Maintenance Page using Cloudflare Workers.

Install
module "maintenance" {
source = "adinhodovic/maintenance/cloudflare"
version = "0.11.1"
}
plain text: /constructs/tfmod-adinhodovic-maintenance-cloudflare/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform-Cloudflare-Maintenance Terraform module to create a responsive Maintenance Page using Cloudflare Workers. The Cloudflare script intercepts all incoming requests and checks if the request is coming from an IP that is in the whitelist or if the request path matches a whitelisted path. If the request is not whitelisted, it returns a maintenance page. The module can be used through Terraform's registry. Preview !Preview You can preview the full page here. Usage A detailed explanation of the implementation can be found here. Export cloudflare credentials ``bash TF_VAR_cloudflare_email=xxx TF_VAR_cloudflare_api_key=xxx TF_VAR_cloudflare_account_id=xxx ` If using a token, make sure it has all the necessary permissions Simple maintenance page with your logo, fav icon, company name, font

Inputs (14)
NameTypeDescriptionDefault
cloudflare_zonestring required
patternslist(string)The DNS pattern list to deploy the maintenance page to. required
company_namestring required
emailstringThe email address to used for support inquiries. required
logo_urlstringThe logo to be displayed. required
statuspage_urlstringThe status page address to get updated information."null"
favicon_urlstringThe favicon to be displayed. Defaults to a maintenance icon from the web."https://cdn1.iconfinder.com/data/icons/
image_urlstringThe main image to be displayed."https://i.imgur.com/0uJkCM8.png"
fontstring[Google font](https://fonts.google.com/) that should be used."Poppins"
info_htmlstringThe HTML to be displayed in the info section."\u003ch1\u003eOur site is currently dow
enabledboolFlag to create/delete the worker route.true
whitelist_ipsstringThe IPs that are whitelisted to bypass the maintenance page."null"
whitelist_pathstringThe paths that are whitelisted defined with a regex expression to bypass the mai"null"
account_idstringCloudflare account idnull
Resources (2)
cloudflare_workers_routecloudflare_workers_script
Details
FrameworkTerraform Module
LanguageHCL
Version0.11.1
Cloud CLOUDFLARE
★ Stars128
Forks29
Total downloads3.6k
Inputs14
Resources2
Examples1
LicenseMIT
Namespaceadinhodovic
Updated