Skip to content

Latest commit

 

History

History

glb

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

CIS GLB module

This module provisions a global load balancer that includes load balancers, origin pools, and health checks. For more information, see the main readme file for this module.

Usage

provider "ibm" {
  ibmcloud_api_key = ""
}

module "cis_glb" {
  source             = "terraform-ibm-modules/cis/ibm//glb"
  cis_instance_id = "crn:v1:bluemix:public:internet-svcs:global:a/xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX:xxxxxxxx-XXXX-xxxx-XXXX-xxxxxXXXXxxxx::"
  domain_id       = "xxxxXXXXxxxxXXXXxxxxxxxxXXXXxxxx"
  glb_name           = "cis_glb"
  fallback_pool_name = "cis_fpn"
  glb_enabled        = true
  origin_pools       = [
    {
      name = "glb1"
      origins = [{
        name    = "o-1"
        address = "1.1.1.0"
        enabled = true
        }]
      enabled           = true
      description       = "Test GLB"
      check_regions     = ["WEU"]
      health_check_name = "hc1"
    }
  ]
  health_checks       = [
    {
      expected_body  = "alive"
      expected_codes = "200"
      method         = "GET"
      timeout        = 7
      path           = "/health"
      interval       = 60
      retries        = 3
      name           = "hc1"
    }
  ]
}

Requirements

Name Version
terraform >= 1.3.0
ibm >= 1.63.0

Modules

No modules.

Resources

Name Type
ibm_cis_global_load_balancer.cis_glb resource
ibm_cis_healthcheck.health_check resource
ibm_cis_origin_pool.origin_pool resource

Inputs

Name Description Type Default Required
cis_instance_id CRN of the existing CIS Instance. string n/a yes
default_pool_ids List of default pool IDs. list(string) null no
domain_id Existing domain ID of the CIS Instance. string n/a yes
fallback_pool_id ID of the fallback pool. Required if fallback_pool_name is not provided. string null no
fallback_pool_name FallBack Pool Name. Required if fallback_pool_id is not provided. string null no
glb_description Description of the CIS global load balancer. string null no
glb_enabled Whether the CIS global load balancer is enabled. If set to true, the load balancer is enabled and can receive network traffic. bool n/a yes
glb_name The DNS name to associate with CIS global load balancer. It can be a hostname. string n/a yes
glb_proxied Set to true if the host name receives origin protection by IBM CIS instance. bool null no
health_checks List of health checks to be created for the CIS global load balancer.
list(object({
name = string
description = optional(string)
path = optional(string)
type = optional(string)
port = optional(number)
expected_body = string
expected_codes = string
method = optional(string)
timeout = optional(number)
follow_redirects = optional(bool)
allow_insecure = optional(bool)
interval = optional(number)
retries = optional(number)
}))
[] no
origin_pools List of origins with an associated health check to be created for the CIS global load balancer.
list(object({
name = string
origins = list(object({
name = string
address = string
enabled = optional(bool)
weight = optional(number)
}))
enabled = bool # if set to true, the pool is enabled and can receive incoming network traffic
description = optional(string)
check_regions = list(string) # list of region codes
minimum_origins = optional(number)
health_check_name = optional(string)
notification_email = optional(string)
}))
[] no
pop_pools Pop pools of the CIS global load balancer.
list(object({
pop = string
pool_ids = list(string)
}))
[] no
region_pools Region pools of the CIS global load balancer.
list(object({
region = string
pool_ids = list(string)
}))
[] no
session_affinity Session Affinity of the CIS global load balancer. To make use of session affinity, glb_proxied has to be true. string null no
steering_policy Steering Policy of the CIS global load balancer. string "off" no
ttl Time to live (TTL) for the CIS global load balancer (GLB), in seconds. If the GLB is proxied, the value is set automatically. number null no

Outputs

Name Description
glb_id ID of CIS GLB
health_check_id IDs of CIS Health Checks
origin_pool_ids IDs of CIS origin pools