2023-08-14 02:48:27 -07:00
# Google Cloud VMWare Engine Private Cloud Module
2023-12-21 05:23:38 -08:00
The module manages one or more Google Cloud VMWare Engine Private Clouds.
It also optionally creates:
- A VMWare engine network, shared betwee or it can work with an existing one. The module optionally creates peering connections to users' VPCs or other VMware engine networks.
2023-08-14 02:48:27 -07:00
2023-10-31 07:35:27 -07:00
To understand the limits and to properly configure the vSphere/vSAN subnets CIDR range please refer to the [GCVE public documentation ](https://cloud.google.com/vmware-engine/docs/quickstart-networking-requirements ).
2023-08-14 02:48:27 -07:00
2023-08-17 03:05:44 -07:00
Be aware that the deployment of this module might require up to 2 hours depending on the selected private cloud target zone.
2023-08-14 02:48:27 -07:00
<!-- BEGIN TOC -->
- [Limitations ](#limitations )
- [Basic Private Cloud Creation ](#basic-private-cloud-creation )
2023-12-21 05:23:38 -08:00
- [Customize management cluster configs ](#customize-management-cluster-configs )
- [Create additional clusters ](#create-additional-clusters )
2023-08-14 02:48:27 -07:00
- [Variables ](#variables )
2023-08-17 00:37:48 -07:00
- [Outputs ](#outputs )
2023-08-14 02:48:27 -07:00
<!-- END TOC -->
## Limitations
2023-12-21 05:23:38 -08:00
At the moment this module doesn't support the creation of stretched private clouds.
2023-08-14 02:48:27 -07:00
## Basic Private Cloud Creation
```hcl
module "gcve-pc" {
2023-08-18 06:38:35 -07:00
source = "./fabric/modules/gcve-private-cloud"
2023-12-21 05:23:38 -08:00
prefix = "gcve-pc"
2023-08-18 06:38:35 -07:00
project_id = "gcve-test-project"
2023-08-14 02:48:27 -07:00
2023-12-21 05:23:38 -08:00
vmw_network_peerings = {
2023-08-14 02:48:27 -07:00
transit-conn1 = {
2023-12-21 05:23:38 -08:00
name = "to-my-vpc"
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"
2023-08-14 02:48:27 -07:00
}
}
}
2023-12-21 05:23:38 -08:00
# tftest modules=1 resources=3 inventory=basic.yaml
2023-08-14 02:48:27 -07:00
```
2023-12-21 05:23:38 -08:00
## Customize management cluster configs
You can customize the management cluster of each VMware engine private cloud.
2023-08-14 02:48:27 -07:00
```hcl
module "gcve-pc" {
2023-08-18 06:38:35 -07:00
source = "./fabric/modules/gcve-private-cloud"
2023-12-21 05:23:38 -08:00
prefix = "gcve-pc"
2023-08-18 06:38:35 -07:00
project_id = "gcve-test-project"
2023-08-14 02:48:27 -07:00
2023-12-21 05:23:38 -08:00
vmw_network_peerings = {
transit-conn1 = {
name = "to-my-vpc"
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"
}
2023-08-14 02:48:27 -07:00
}
2023-12-21 05:23:38 -08:00
}
# tftest modules=1 resources=3 inventory=custom-management.yaml
```
## Create additional clusters
You can optionally create additional clusters in each VMware engine private cloud.
```hcl
module "gcve-pc" {
source = "./fabric/modules/gcve-private-cloud"
prefix = "gcve-pc"
project_id = "gcve-test-project"
2023-08-14 02:48:27 -07:00
2023-12-21 05:23:38 -08:00
vmw_network_peerings = {
2023-08-14 02:48:27 -07:00
transit-conn1 = {
2023-12-21 05:23:38 -08:00
name = "to-my-vpc"
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"
2023-08-14 02:48:27 -07:00
}
}
}
2023-12-21 05:23:38 -08:00
# tftest modules=1 resources=5 inventory=additional-clusters.yaml
2023-08-14 02:48:27 -07:00
```
<!-- BEGIN TFDOC -->
## Variables
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
2023-12-21 05:23:38 -08:00
| [prefix ](variables.tf#L17 ) | Resources name prefix. | < code > string</ code > | ✓ | |
| [project_id ](variables.tf#L22 ) | Project id. | < code > string</ code > | ✓ | |
| [vmw_network_config ](variables.tf#L27 ) | VMware Engine network configuration. | < code title = "object({ create = optional(bool, true) description = optional(string, "Terraform-managed.") name = optional(string, "default") })" > object({…}) </ code > | | < code > {} </ code > |
| [vmw_network_peerings ](variables.tf#L37 ) | The network peerings towards users' VPCs or other VMware Engine networks. The key is the peering name suffix. | < code title = "map(object({ peer_network = string description = optional(string, "Managed by Terraform.") export_custom_routes = optional(bool, false) export_custom_routes_with_public_ip = optional(bool, false) import_custom_routes = optional(bool, false) import_custom_routes_with_public_ip = optional(bool, false) peer_to_vmware_engine_network = optional(bool, false) }))" > map( object({…})) </ code > | | < code > {} </ code > |
| [vmw_private_cloud_configs ](variables.tf#L51 ) | The VMware private cloud configurations. The key is the unique private cloud name suffix. | < code title = "map(object({ cidr = string zone = string additional_cluster_configs = optional(map(object({ custom_core_count = optional(number) node_count = optional(number, 3) node_type_id = optional(string, "standard-72") })), {}) management_cluster_config = optional(object({ custom_core_count = optional(number) name = optional(string, "mgmt-cluster") node_count = optional(number, 3) node_type_id = optional(string, "standard-72") }), {}) description = optional(string, "Managed by Terraform.") }))" > map( object({…})) </ code > | | < code title = "{ 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" } }" > {…} </ code > |
2023-08-17 00:37:48 -07:00
## Outputs
| name | description | sensitive |
|---|---|:---:|
2023-12-21 05:23:38 -08:00
| [vmw_engine_network_config ](outputs.tf#L17 ) | VMware engine network configuration. | |
| [vmw_engine_network_peerings ](outputs.tf#L22 ) | The peerings created towards the user VPC or other VMware engine networks. | |
| [vmw_engine_private_clouds ](outputs.tf#L27 ) | VMware engine private cloud resources. | |
2023-08-14 02:48:27 -07:00
<!-- END TFDOC -->