Files
hunfabric/modules/cloud-config-container/envoy-sni-dyn-fwd-proxy
Ludovico Magnocavallo 6941313c7d Factories refactor (#1843)
* factories refactor doc

* Adds file schema and filesystem organization

* Update 20231106-factories.md

* move factories out of blueprints and create new factories  README

* align factory in billing-account module

* align factory in dataplex-datascan module

* align factory in billing-account module

* align factory in net-firewall-policy module

* align factory in dns-response-policy module

* align factory in net-vpc-firewall module

* align factory in net-vpc module

* align factory variable names in FAST

* remove decentralized firewall blueprint

* bump terraform version

* bump module versions

* update top-level READMEs

* move project factory to modules

* fix variable names and tests

* tfdoc

* remove changelog link

* add project factory to top-level README

* fix cludrun eventarc diff

* fix README

* fix cludrun eventarc diff

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-02-26 10:16:52 +00:00
..
2024-02-26 10:16:52 +00:00

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.