cloud-foundation-fabric/modules/cloud-config-container/envoy-sni-dyn-fwd-proxy
apichick 73e286c0ab
Added spanner-instance module (#2372)
2024-06-23 17:25:22 +00:00
..
files Fixed envoy file, it has extra character 2023-11-24 10:34:51 +01:00
README.md Added envoy as SNI dynamic forward proxy to cloud-config-container 2023-11-03 08:21:20 +01:00
main.tf Added envoy as SNI dynamic forward proxy to cloud-config-container 2023-11-03 08:21:20 +01:00
outputs.tf Added envoy as SNI dynamic forward proxy to cloud-config-container 2023-11-03 08:21:20 +01:00
variables.tf Added envoy as SNI dynamic forward proxy to cloud-config-container 2023-11-03 08:21:20 +01:00
versions.tf Added spanner-instance module (#2372) 2024-06-23 17:25:22 +00:00

README.md

Containerized Envoy as SNI dynamic forward proxy on Container Optimized OS

This module manages a cloud-config configuration that starts a containerized [Envoy SNI Dynamic forward proxy]https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/sni_dynamic_forward_proxy_filter) service on Container Optimized OS running on port 443.

This module depends on the cos-generic-metadata module being in the parent folder. If you change its location be sure to adjust the source attribute in main.tf.

Logging and monitoring are enabled via the Google Cloud Logging agent configured for the instance via the google-logging-enabled metadata property, and the Node Problem Detector service started by default on boot.

Examples

Default configuration

This example will create a cloud-config that uses the module's defaults, creating a simple hello web server showing host name and request id.

module "cos-envoy-sni-dyn-fwd-proxy" {
  source      = "./fabric/modules/cloud-config-container/envoy-sni-dyn-fwd-proxy"
  envoy_image = "envoyproxy/envoy:v1.28-latest"
}

module "vm-envoy-sni-dyn-fwd-proxy" {
  source     = "./fabric/modules/compute-vm"
  project_id = "my-project"
  zone       = "europe-west8-b"
  name       = "cos-envoy-sni-dyn-fw-proxy"
  network_interfaces = [{
    network    = "default"
    subnetwork = "gce"
  }]
  metadata = {
    user-data              = module.cos-envoy-sni-dyn-fwd-proxy.cloud_config
    google-logging-enabled = true
  }
  boot_disk = {
    initialize_params = {
      image = "projects/cos-cloud/global/images/family/cos-stable"
      type  = "pd-ssd"
      size  = 10
    }
  }
  tags = ["https-server", "ssh"]
}
# tftest modules=1 resources=1

Variables

name description type required default
envoy_image Image. string

Outputs

name description sensitive
cloud_config Rendered cloud-config file to be passed as user-data instance metadata.