lb

AckeeCZ/lb/gcp

Terraform Module HCL GCP

Terraform module for provisioning of GCP LB on top of precreated named NEG passed as parameter to this module.

Install
module "lb" {
source = "AckeeCZ/lb/gcp"
version = "7.2.2"
}
plain text: /constructs/tfmod-ackeecz-lb-gcp/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform GCP HTTP(S) Load Balancing Terraform module for provisioning of GCP LB on top of precreated named NEGs, Cloud Run services and GCS buckets passed as parameter to this module. Usage HTTPS Load-balancer with self-signed certificate and Cloudflare DNS record creation: ``hcl data "cloudflare_zones" "ackee_cz" { filter { name = "ackee.cz" } } resource "google_storage_bucket" "test" { name = "test-randompostfix-98582341" location = var.region storage_class = "STANDARD" uniform_bucket_level_access = true website { main_page_suffix = "index.html" } } module "api_unicorn" { source = "git::ssh://[email protected]/Infra/tf-module/terraform-gcp-lb.git?ref=master" name = "main-${var.project}-${var.namespace}" project = var.project region = var.region self_signed_tls = true services = [ { type

Inputs (40)
NameTypeDescriptionDefault
regionstringGCP region where we will look for NEGs required
serviceslist(object({ name List of services: cloudrun, neg, bucket, ... to be used in the map Use required
url_mapmap(object({ hostnames Url map setup required
projectstringProject ID required
iap_setupmap(object({ oauth2_clientService setup for IAP, overwrites default_iap_setup if used{}
non_tls_global_forwarding_rule_namestringGlobal non tls forwarding rule name, if set, changes name of non-tls forwarding ""
logging_sink_bucket_retencynumberNumber of days after which log files are deleted from bucket730
zonestringGCP zone where we will look for NEGs - optional parameter, if not set, the we winull
namestringInstance name"default_value"
self_signed_tlsboolIf true, creates self-signed TLS certfalse
managed_certificate_namestringName of Google-managed certificate. Useful when migrating from Ingress-provisionnull
timeout_secnumberHow long (in seconds) to wait before claiming failure. The default value is 5 se5
health_check_request_pathstringHealth checked path (URN)"/healthz"
log_config_sample_ratestringThe value of the field must be in [0, 1]. This configures the sampling rate of r"1.0"
keys_valid_periodnumberValidation period of the self signed key29200
unhealthy_thresholdnumberA so-far healthy instance will be marked unhealthy after this many consecutive f2
custom_health_check_portslist(string)Custom ports for GCE health checks, not needed unless your services are not in 3[]
private_keystringThe write-only private key in PEM format. Note: This property is sensitive and wnull
custom_target_https_proxy_namestringCustom name for HTTPS proxy name used.""
google_managed_tlsboolIf true, creates Google-managed TLS certfalse
http_backend_timeoutstringTime of http request timeout (in seconds)"30"
dont_use_dns_names_in_certificateboolDue to backward compatibility, TLS setup can omit setup of dns_names in self sigfalse
custom_target_http_proxy_namestringCustom name for HTTP proxy name used instead of non-tls-proxy-""
allow_non_tls_frontendstringIf true, enables port 80 frontend - creates non-TLS (http://) variant of LBfalse
Outputs (1)
ip_address — IP address
Resources (19)
google_compute_backend_bucketgoogle_compute_backend_servicegoogle_compute_firewallgoogle_compute_global_addressgoogle_compute_global_forwarding_rulegoogle_compute_health_checkgoogle_compute_managed_ssl_certificategoogle_compute_region_network_endpoint_groupgoogle_compute_ssl_certificategoogle_compute_target_http_proxygoogle_compute_target_https_proxygoogle_compute_url_mapgoogle_logging_project_sinkgoogle_storage_bucketgoogle_storage_bucket_iam_bindingrandom_idrandom_stringtls_private_keytls_self_signed_cert
Details
FrameworkTerraform Module
LanguageHCL
Version7.2.2
Cloud GCP
★ Stars0
Forks0
Total downloads3.3k
Inputs40
Outputs1
Resources19
NamespaceAckeeCZ
Updated