Terraform module for Cloud Flare Load Balancer
Go to file
Jakub Sokołowski 0237e72a9d
add required account_id for resources
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-03-15 11:35:44 +01:00
README.md add basic README 2023-01-11 22:06:51 +01:00
main.tf add required account_id for resources 2024-03-15 11:35:44 +01:00
variables.tf add basic README 2023-01-11 22:06:51 +01:00
versions.tf upgrade provider from 3.26.0 ot 4.26.0 2024-03-15 11:27:48 +01:00

README.md

Description

This defines a Terraform module that configures a Cloud Flare Load Balancer.

Usage

module "my_lb" {
  source     = "github.com/status-im/infra-tf-cloud-flare-lb"
  
  name   = "blog"
  domain = "example.org"
  hosts  = module.my_blog_hosts.hosts_by_dc

  /* Required to map our DCs to pool regions. */
  region_map = tomap({
    "gc-us-central1-a" = "ENAM" /* Eastern North America */
    "ac-cn-hongkong-c" = "SEAS" /* Southeast Asia */
    "do-eu-amsterdam3" = "EEU" /* Eastern Europe */
  })

  account_id = data.pass_password.cloudflare_account.password
}

Variables

Here are the variables available in the module:

  • General
    • name - Name of load balancer.
    • domain - Name of domain to use.
  • Hosts
    • hosts - Map of DCs with map of hostnames and their IPs.
    • region_map - Map of pool DCs to regions.
  • Check
    • check_method - Method for endpoint healthcheck. (default: GET)
    • check_type - Type of endpoint healthcheck. (default: https)
    • check_path - Path for endpoint healthcheck. (default: /health)
    • check_expected_codes - Response code for healthcheck. (default: 2xx)
    • check_expected_body - Response body for healthcheck. (default: OK)
  • Plumbing
    • account_id - ID of CloudFlare organization or account.
    • zone_id - ID of CloudFlare zone for host record.