cloud-foundation-fabric/modules/gcve-private-cloud
Julio Castillo 3af7e257d2
Add tflint to pipelines (#2220)
* Fix terraform_deprecated_index

https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_index.md

* Fix terraform_deprecated_interpolation

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_interpolation.md

* Fix more indexing

* Remove unused variable

* Enable TFLint for modules

* Add tflint config file

* Fix chdir

* Lint modules

* TFLint fixes

* TFLint

* Fixes binauthz README

* Fixes DNS response policy tests. Restores MIG outputs.

* Fixes other DNS response policy tests.

* Update tests for fast 2-e

* Moar fixed tests

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-04-17 10:23:48 +02:00
..
README.md FAST GCVE stage (#2191) 2024-04-03 17:25:12 +02:00
main.tf Add tflint to pipelines (#2220) 2024-04-17 10:23:48 +02:00
outputs.tf Add tflint to pipelines (#2220) 2024-04-17 10:23:48 +02:00
variables.tf GCVE: add network policy configuration 2023-12-22 10:02:12 +00:00
versions.tf feat(gke-cluster-standard): Add optional `CiliumClusterWideNetworkPolicy` (#2207) 2024-04-09 17:08:36 +02:00

README.md

Google Cloud VMWare Engine Private Cloud Module

The module manages one or more Google Cloud VMWare Engine Private Clouds.

It can either create a new VMWare engine network shared between the private clouds or it can use an existing one. The module also creates peering connections to users' VPCs or other VMware engine networks.

To understand the limits and to properly configure the vSphere/vSAN subnets CIDR range please refer to the GCVE public documentation.

The deployment might require up to 2 hours, depending on the selected private cloud target zone.

Limitations

The module (and the underlying resource) still don't support the creation of stretched (regional) private clouds.

Basic Private Cloud Creation

module "gcve-pc" {
  source     = "./fabric/modules/gcve-private-cloud"
  prefix     = "gcve-pc"
  project_id = "gcve-test-project"

  vmw_network_peerings = {
    transit-conn1 = {
      peer_network = "projects/test-prj-gcve-01/global/networks/default"
    }
  }

  vmw_private_cloud_configs = {
    pcc_one = {
      cidr = "192.168.0.0/24"
      zone = "europe-west8-a"
    }
  }
}
# tftest modules=1 resources=3 inventory=basic.yaml

Customize management cluster configs

You can customize the management cluster of each VMware engine private cloud.

module "gcve-pc" {
  source     = "./fabric/modules/gcve-private-cloud"
  prefix     = "gcve-pc"
  project_id = "gcve-test-project"

  vmw_network_peerings = {
    transit-conn1 = {
      peer_network = "projects/test-prj-gcve-01/global/networks/default"
    }
  }

  vmw_private_cloud_configs = {
    pcc_one = {
      cidr = "192.168.0.0/24"
      management_cluster_config = {
        node_type_id      = "standard-72"
        node_count        = 6
        custom_core_count = 28
      }
      zone = "europe-west8-a"
    }
  }
}
# tftest modules=1 resources=3 inventory=custom-management.yaml

Create additional clusters

You can optionally create additional clusters in each VMware engine private cloud.

module "gcve-pc" {
  source     = "./fabric/modules/gcve-private-cloud"
  prefix     = "gcve-pc"
  project_id = "gcve-test-project"

  vmw_network_peerings = {
    transit-conn1 = {
      peer_network = "projects/test-prj-gcve-01/global/networks/default"
    }
  }

  vmw_private_cloud_configs = {
    pcc_one = {
      cidr = "192.168.0.0/24"
      additional_cluster_configs = {
        test-cluster-one = {
          node_type_id      = "standard-72"
          node_count        = 6
          custom_core_count = 28
        }
        test-cluster-two = {
          node_type_id      = "standard-72"
          node_count        = 4
          custom_core_count = 28
        }
      }
      zone = "europe-west8-a"
    }
  }
}
# tftest modules=1 resources=5 inventory=additional-clusters.yaml

Enable cluster Internet access and inbound connectivity

module "gcve-pc" {
  source     = "./fabric/modules/gcve-private-cloud"
  prefix     = "gcve-pc"
  project_id = "gcve-test-project"
  vmw_network_config = {
    network_policies = {
      ew8 = {
        edge_services_cidr       = "192.168.100.0/26"
        region                   = "europe-west8"
        expose_on_internet       = true
        outbound_internet_access = true
      }
    }
  }
  vmw_private_cloud_configs = {
    pcc_one = {
      cidr = "192.168.0.0/24"
      zone = "europe-west8-a"
    }
  }
}
# tftest modules=1 resources=3 inventory=network-policy.yaml

Variables

name description type required default
prefix Resources name prefix. string
project_id Project id. string
vmw_network_config VMware Engine network configuration. object({…}) {}
vmw_network_peerings The network peerings towards users' VPCs or other VMware Engine networks. The key is the peering name suffix. map(object({…})) {}
vmw_private_cloud_configs The VMware private cloud configurations. The key is the unique private cloud name suffix. map(object({…})) {…}

Outputs

name description sensitive
vmw_engine_network_config VMware engine network configuration.
vmw_engine_network_peerings The peerings created towards the user VPC or other VMware engine networks.
vmw_engine_network_policies The network policies associated to the VMware engine network.
vmw_engine_private_clouds VMware engine private cloud resources.
vmw_private_cloud_network VMware engine network.