cloud-foundation-fabric/modules/cloud-config-container/simple-nva
Ludovico Magnocavallo e8056577ce
Refactor GKE nodepool and blueprints (#875)
* first shot, untested

* example tests working

* module tests

* work on gke blueprints

* multitenant fleet doc examples

* fix gke hub doc examples

* blueprint tests

* move master range to vpc config

* fast stage 3 gke test

* tfdoc

* bump provider versions

* and bump provider again to latest
2022-10-12 12:59:36 +02:00
..
files Update ipprefix_by_netmask.sh (#866) 2022-10-09 17:26:54 +02:00
README.md Update README.md 2022-10-09 15:41:56 +02:00
cloud-config.yaml Fixes NVA issue when health checks are not enabled (#853) 2022-10-04 07:55:10 +02:00
instance.tf COS based simple networking appliance (#846) 2022-09-30 18:43:24 +02:00
main.tf COS based simple networking appliance (#846) 2022-09-30 18:43:24 +02:00
outputs-instance.tf COS based simple networking appliance (#846) 2022-09-30 18:43:24 +02:00
outputs.tf COS based simple networking appliance (#846) 2022-09-30 18:43:24 +02:00
variables-instance.tf COS based simple networking appliance (#846) 2022-09-30 18:43:24 +02:00
variables.tf COS based simple networking appliance (#846) 2022-09-30 18:43:24 +02:00
versions.tf Refactor GKE nodepool and blueprints (#875) 2022-10-12 12:59:36 +02:00

README.md

Google Simple NVA Module

This module allows for the creation of a NVA (Network Virtual Appliance) to be used for experiments and as a stub for future appliances deployment.

This NVA can be used to interconnect up to 8 VPCs.

Examples

Simple example

# Interfaces configuration
locals {
  network_interfaces = [
    {
      addresses  = null
      name       = "dev"
      nat        = false
      network    = "dev_vpc_self_link"
      routes     = ["10.128.0.0/9"]
      subnetwork = "dev_vpc_nva_subnet_self_link"
    },
    {
      addresses  = null
      name       = "prod"
      nat        = false
      network    = "prod_vpc_self_link"
      routes     = ["10.0.0.0/9"]
      subnetwork = "prod_vpc_nva_subnet_self_link"
    }
}

# NVA config
module "nva-cloud-config" {
  source               = "../../../cloud-foundation-fabric/modules/cloud-config-container/simple-nva"
  enable_health_checks = true
  network_interfaces   = local.network_interfaces
}

# COS VM
module "nva" {
  source             = "../../modules/compute-vm"
  project_id         = "myproject"
  instance_type      = "e2-standard-2"
  name               = "nva"
  can_ip_forward     = true
  zone               = "europe-west8-a"
  tags               = ["nva"]
  network_interfaces = local.network_interfaces
  boot_disk = {
    image = "projects/cos-cloud/global/images/family/cos-stable"
    size  = 10
    type  = "pd-balanced"
  }
  metadata = {
    user-data = module.nva-cloud-config.cloud_config
  }
}

Variables

name description type required default
network_interfaces Network interfaces configuration. list(object({…}))
cloud_config Cloud config template path. If null default will be used. string null
enable_health_checks Configures routing to enable responses to health check probes. bool false
test_instance Test/development instance attributes, leave null to skip creation. object({…}) null
test_instance_defaults Test/development instance defaults used for optional configuration. If image is null, COS stable will be used. object({…}) {…}

Outputs

name description sensitive
cloud_config Rendered cloud-config file to be passed as user-data instance metadata.
test_instance Optional test instance name and address.