GithubHelp home page GithubHelp logo

standardgalactic / terraform-cloudflare-maintenance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adinhodovic/terraform-cloudflare-maintenance

0.0 0.0 0.0 82 KB

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

Home Page: https://hodovi.cc/maintenance

License: MIT License

HCL 42.21% JavaScript 57.79%

terraform-cloudflare-maintenance's Introduction

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.4.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.4.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

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
statuspage_url The status page address to get updated information. string null no
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
whitelist_ips The IPs that are white listed to bypass the maintenance page. string "placeholder" 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.

terraform-cloudflare-maintenance's People

Contributors

adinhodovic avatar dependabot[bot] avatar emmanuelgeoffray avatar mwadm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.