cloud-foundation-fabric/modules/gcve-private-cloud/README.md

101 lines
5.7 KiB
Markdown
Raw Normal View History

2023-08-14 02:48:27 -07:00
# Google Cloud VMWare Engine Private Cloud Module
2023-08-17 00:37:48 -07:00
This module implements the creation and management of a Google Cloud VMWare Engine Private Cloud with its management cluster. If configured, it also creates the VMWare engine network or it can work with an existing one. The creation of the private connection with the user VPC requires the execution of the [Google SDK command](https://cloud.google.com/sdk/gcloud/reference/vmware/private-connections/create#--routing-mode) the module provides as an output.
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)
- [Private Cloud Creation with custom nodes and cores count](#private-cloud-creation-with-custom-nodes-and-cores-count)
- [Variables](#variables)
2023-08-17 00:37:48 -07:00
- [Outputs](#outputs)
2023-08-14 02:48:27 -07:00
<!-- END TOC -->
## Limitations
At the moment this module doesn't support the following use cases:
2023-08-17 00:37:48 -07:00
- Single node private cloud
- Stretched private cloud
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"
name = "gcve-pc"
project_id = "gcve-test-project"
zone = "europe-west8-a"
cidr = "192.168.0.0/24"
2023-08-14 02:48:27 -07:00
private_connections = {
transit-conn1 = {
2023-08-18 06:38:35 -07:00
name = "transit-conn1"
network_self_link = "projects/test-prj-gcve-01/global/networks/default"
tenant_host_project = "g39a814990532d10ap-tp"
type = "PRIVATE_SERVICE_ACCESS"
routing_mode = "REGIONAL"
2023-08-14 02:48:27 -07:00
}
}
}
# tftest modules=1 resources=2 inventory=basic.yaml
```
## Private Cloud Creation with custom nodes and cores count
```hcl
module "gcve-pc" {
2023-08-18 06:38:35 -07:00
source = "./fabric/modules/gcve-private-cloud"
name = "gcve-pc"
project_id = "gcve-test-project"
zone = "europe-west8-a"
cidr = "192.168.0.0/24"
2023-08-14 02:48:27 -07:00
management_cluster_config = {
node_type_id = "standard-72"
node_count = 6
custom_core_count = 28
}
private_connections = {
transit-conn1 = {
2023-08-18 06:38:35 -07:00
name = "transit-conn1"
network_self_link = "projects/test-prj-gcve-01/global/networks/default"
tenant_host_project = "g39a814990532d10ap-tp"
type = "PRIVATE_SERVICE_ACCESS"
routing_mode = "REGIONAL"
2023-08-14 02:48:27 -07:00
}
}
}
# tftest modules=1 resources=2 inventory=custom.yaml
```
<!-- BEGIN TFDOC -->
## Variables
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
2023-08-18 07:52:58 -07:00
| [cidr](variables.tf#L16) | vSphere/vSAN subnets CIDR range. To undersatnd the limits, please refer to [GCVE network requirements](https://cloud.google.com/vmware-engine/docs/quickstart-networking-requirements). | <code>string</code> | ✓ | |
| [name](variables.tf#L42) | Private cloud name. | <code>string</code> | ✓ | |
| [project_id](variables.tf#L84) | Project id. | <code>string</code> | ✓ | |
| [zone](variables.tf#L101) | Private cloud zone. | <code>string</code> | ✓ | |
| [description](variables.tf#L21) | Private cloud description. | <code>string</code> | | <code>&#34;Terraform-managed.&#34;</code> |
| [management_cluster_config](variables.tf#L27) | Management cluster configuration. | <code title="object&#40;&#123;&#10; node_type_id &#61; string&#10; node_count &#61; number,&#10; custom_core_count &#61; number&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code title="&#123;&#10; node_type_id &#61; &#34;standard-72&#34;,&#10; node_count &#61; 3,&#10; custom_core_count &#61; null&#10;&#125;">&#123;&#8230;&#125;</code> |
| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | <code title="map&#40;object&#40;&#123;&#10; name &#61; string&#10; network_self_link &#61; string&#10; peering_name &#61; optional&#40;string&#41;&#10; tenant_host_project &#61; optional&#40;string&#41;&#10; description &#61; optional&#40;string, &#34;Terraform-managed.&#34;&#41;&#10; type &#61; optional&#40;string, &#34;PRIVATE_SERVICE_ACCESS&#34;&#41;&#10; routing_mode &#61; optional&#40;string, &#34;REGIONAL&#34;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [vmw_network_create](variables.tf#L89) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | <code>bool</code> | | <code>true</code> |
| [vmw_network_description](variables.tf#L95) | VMware Engine network description. | <code>string</code> | | <code>&#34;Terraform-managed.&#34;</code> |
2023-08-17 00:37:48 -07:00
## Outputs
| name | description | sensitive |
|---|---|:---:|
| [hcx](outputs.tf#L17) | Details about a HCX Cloud Manager appliance. | |
2023-08-18 08:01:12 -07:00
| [id](outputs.tf#L22) | ID of the private cloud. | |
| [management_cluster](outputs.tf#L27) | Details of the management cluster of the private cloud. | |
| [network_config](outputs.tf#L32) | Details about the network configuration of the private cloud. | |
2023-08-17 00:37:48 -07:00
| [nsx](outputs.tf#L37) | Details about a NSX Manager appliance. | |
2023-08-18 07:57:35 -07:00
| [private-cloud](outputs.tf#L42) | The private cloud resource. | |
2023-08-18 02:20:27 -07:00
| [private_connections_setup](outputs.tf#L47) | Cloud SDK commands for the private connections manual setup. | |
2023-08-18 08:01:12 -07:00
| [state](outputs.tf#L63) | Details about the state of the private cloud. | |
2023-08-18 02:20:27 -07:00
| [vcenter](outputs.tf#L68) | Details about a vCenter Server management appliance. | |
2023-08-14 02:48:27 -07:00
<!-- END TFDOC -->