All Projects → adinhodovic → terraform-cloudflare-maintenance

adinhodovic / terraform-cloudflare-maintenance

Licence: MIT license
Terraform module to create a responsive Maintenance Page using Cloudflare Workers.

Programming Languages

javascript
184084 projects - #8 most used programming language
HCL
1544 projects

Projects that are alternatives of or similar to terraform-cloudflare-maintenance

cloudflare-worker-graphql-ws-template
A template for WebSockets powered Cloudflare Worker project using graphql-ws
Stars: ✭ 21 (-81.08%)
Mutual labels:  cloudflare, cloudflare-workers
Maintenance Book
”SurviveJS — Maintenance” book
Stars: ✭ 105 (-5.41%)
Mutual labels:  web-development, maintenance
workers-graphql-gateway-example
GraphQL running on Cloudflare Workers
Stars: ✭ 68 (-38.74%)
Mutual labels:  cloudflare, cloudflare-workers
supaflare
URL shortener / redirection service powered by Supabase, Cloudflare Workers, Workers KV and Cloudflare Pages.
Stars: ✭ 51 (-54.05%)
Mutual labels:  cloudflare, cloudflare-workers
worker-auth-providers
worker-auth-providers is an open-source providers to make authentication easy with workers. Very lightweight script which doesn't need a lot of dependencies. Plug it with any framework or template of workers.
Stars: ✭ 85 (-23.42%)
Mutual labels:  cloudflare, cloudflare-workers
wrangler2
🤠 wrangle your Cloudflare Workers
Stars: ✭ 349 (+214.41%)
Mutual labels:  cloudflare, cloudflare-workers
Graphql Starter
💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, and Material UI.
Stars: ✭ 3,377 (+2942.34%)
Mutual labels:  cloudflare, cloudflare-workers
natural
Fastest Framework for NodeJS. Written in pure ES6+
Stars: ✭ 30 (-72.97%)
Mutual labels:  cloudflare, cloudflare-workers
workers-unsplash-api
Serverless API for requesting images from Unsplash's API, designed for use with a React frontend
Stars: ✭ 20 (-81.98%)
Mutual labels:  cloudflare, cloudflare-workers
DNS-over-Discord
A 1.1.1.1 DNS resolver built for Discord
Stars: ✭ 228 (+105.41%)
Mutual labels:  cloudflare, cloudflare-workers
cfw-easy-utils
An in-depth library to assist with common tasks with CF Workers. Includes utils for responses, cookies, and more!
Stars: ✭ 52 (-53.15%)
Mutual labels:  cloudflare, cloudflare-workers
slshx
⚔️ Strongly-typed Discord commands on Cloudflare Workers
Stars: ✭ 163 (+46.85%)
Mutual labels:  cloudflare, cloudflare-workers
relay-starter-kit
💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, Material UI.
Stars: ✭ 3,513 (+3064.86%)
Mutual labels:  cloudflare, cloudflare-workers
cfworker-middware-telegraf
Make telegraf (a telegram bot framework) useable in Cloudflare Workers
Stars: ✭ 23 (-79.28%)
Mutual labels:  cloudflare, cloudflare-workers
telegram-bot-api-worker
Take an alternate route to Telegram Bot API :)
Stars: ✭ 75 (-32.43%)
Mutual labels:  cloudflare, cloudflare-workers
faaskit
A lightweight middleware framework for functions as a service
Stars: ✭ 24 (-78.38%)
Mutual labels:  cloudflare, cloudflare-workers
workers-jwt
Generate JWTs on Cloudflare Workers using the WebCrypto API
Stars: ✭ 67 (-39.64%)
Mutual labels:  cloudflare, cloudflare-workers
miniflare
🔥 Fully-local simulator for Cloudflare Workers
Stars: ✭ 2,811 (+2432.43%)
Mutual labels:  cloudflare, cloudflare-workers
cloudflare-worker-router
A super lightweight router (1.3K) with middleware support and ZERO dependencies for CloudFlare Workers.
Stars: ✭ 144 (+29.73%)
Mutual labels:  cloudflare, cloudflare-workers
IPFS PHOTO SHARE
💰用甚嚒服务器,ServerLess搭建一个图片分享站点!| 基于CloudFlareWorker无服务器函数和IPFS去中心化存储的图片分享网站
Stars: ✭ 76 (-31.53%)
Mutual labels:  cloudflare, cloudflare-workers

Terraform-Cloudflare-Maintenance

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

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

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 and email with multiple routes on the same domain:

module "hodovi_cc_maintenance" {
  source          = "git::[email protected]:adinhodovic/terraform-cloudflare-maintenance.git?ref=v0.6.0"
  cloudflare_zone = "hodovi.cc"
  patterns        = ["hodovi.cc/maintenance/*", "hodovi.cc/example/*"]
  company_name    = "HoneyLogic"
  email           = "[email protected]"
  statuspage_url  = "https://status.hodovi.cc"
  font            = "Poppins"
  logo_url        = "https://s3.eu-west-1.amazonaws.com/honeylogic.io/media/images/Honeylogic-blue.original.png"
  favicon_url     = "https://s3.eu-west-1.amazonaws.com/honeylogic.io/media/images/Honeylogic_-_icon.original.height-80.png"
}

Use the enabled flag to enable/disable the Cloudflare route when maintenance starts/ends:

module "hodovi_cc_maintenance" {
  source          = "git::[email protected]:adinhodovic/terraform-cloudflare-maintenance.git?ref=v0.6.0"
  enabled         = false
  cloudflare_zone = "hodovi.cc"
  patterns        = ["hodovi.cc/maintenance/*"]
  company_name    = "HoneyLogic"
  email           = "[email protected]"
  statuspage_url  = "null"
  font            = "Poppins"
  logo_url        = "https://s3.eu-west-1.amazonaws.com/honeylogic.io/media/images/Honeylogic-blue.original.png"
  favicon_url     = "https://s3.eu-west-1.amazonaws.com/honeylogic.io/media/images/Honeylogic_-_icon.original.height-80.png"
}

Example can be found in examples/root-example.

Requirements

Name Version
terraform >= 0.13
cloudflare > 2.0.0

Providers

Name Version
cloudflare > 2.0.0

Resources

Name Type
cloudflare_worker_route.this resource
cloudflare_worker_script.this resource
cloudflare_zones.this data source

Inputs

Name Description Type Default Required
cloudflare_zone n/a string n/a yes
company_name n/a string n/a yes
email The email address to used for support inquiries. string n/a yes
enabled Flag to create/delete the worker route. bool true no
favicon_url The favicon to be displayed. Defaults to a maintenance icon from the web. string "https://cdn1.iconfinder.com/data/icons/ios-11-glyphs/30/maintenance-512.png" no
font Google font that should be used. string "Poppins" no
logo_url The logo to be displayed. string n/a yes
patterns The DNS pattern list to deploy the maintenance page to. list(string) n/a yes
statuspage_url The status page address to get updated information. string "null" no
whitelist_ips The IPs that are whitelisted to bypass the maintenance page. string "null" no
whitelist_path The paths that are whitelisted defined with a regex expression to bypass the maintenance page. string "null" no

Notes

Get fonts from Google fonts. Ensure that the Google Font is identical in casing e.g "PT Sans" can't be "Pt Sans" otherwise it'll fail to fetch the font.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].