Description

This Terraform module configures CloudFlare Page Rules.

Usage

To use this you have to supply 3 variables:

  • zones - Map of CloudFlare zone names to IDs.
  • target - Domain to point at for domains we are redirecting.
  • redirects - List of redirects to create.

Keep in mind that target is just a "dummy" and should not be used, unless the matching redirect doesn't exist.

Example

Here's an example of how you can configure it:

module "redirect" {
  source    = "modules/cloud-flare-rules"
  zones     = local.zones
  target    = "invalid-domain.status.im"
  redirects = [
    {
      zone   = "status.im"
      domain = "token"
      path   = "/*"
      url    = "https://coinmarketcap.com/currencies/status/"
    },
    {
      zone   = "status.im"
      domain = "banana"
      path   = "/*"
      url    = "https://en.wikipedia.org/wiki/Banana"
    },
  ]
}
S
Description
Terraform module for Cloud Flare Rules
Readme MIT
32 KiB
Languages
HCL 100%