From a509756f1b16ae0029736b898cb8e7d5e3b3a342 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Mon, 14 Aug 2023 11:48:27 +0200 Subject: [PATCH 01/22] GCVE module first release --- modules/gcve-private-cloud/README.md | 97 +++++++++++++++++++ modules/gcve-private-cloud/main.tf | 74 ++++++++++++++ modules/gcve-private-cloud/output.tf | 71 ++++++++++++++ modules/gcve-private-cloud/variables.tf | 92 ++++++++++++++++++ modules/gcve-private-cloud/versions.tf | 29 ++++++ .../gcve_private_cloud/examples/basic.yaml | 40 ++++++++ .../gcve_private_cloud/examples/custom.yaml | 42 ++++++++ 7 files changed, 445 insertions(+) create mode 100644 modules/gcve-private-cloud/README.md create mode 100644 modules/gcve-private-cloud/main.tf create mode 100644 modules/gcve-private-cloud/output.tf create mode 100644 modules/gcve-private-cloud/variables.tf create mode 100644 modules/gcve-private-cloud/versions.tf create mode 100644 tests/modules/gcve_private_cloud/examples/basic.yaml create mode 100644 tests/modules/gcve_private_cloud/examples/custom.yaml diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md new file mode 100644 index 00000000..8baad718 --- /dev/null +++ b/modules/gcve-private-cloud/README.md @@ -0,0 +1,97 @@ +# Google Cloud VMWare Engine Private Cloud Module + +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. + +Be aware that the deployment of this module might requires up to 2 hours depending on the selected private cloud target zone. + +## TOC + + +- [TOC](#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) +- [Files](#files) +- [Variables](#variables) + + +## Limitations +At the moment this module doesn't support the following use cases: +- `Single node private cloud` +- `Stretched private cloud` + +## Basic Private Cloud Creation + +```hcl +module "gcve-pc" { + source = "./fabric/modules/gcve-private-cloud" + name = "gcve-pc" + project_id = "gcve-test-project" + zone = "asia-southeast1-a" + management_cidr = "192.168.0.0/24" + + private_connections = { + transit-conn1 = { + name = "transit-conn1", + network_self_link = "projects/test-prj-elia-01/global/networks/default", + peering = "servicenetworking-googleapis-com" + type = "PRIVATE_SERVICE_ACCESS", + routing_mode = "REGIONAL" + } + } +} +# tftest modules=1 resources=2 inventory=basic.yaml +``` +## Private Cloud Creation with custom nodes and cores count + +```hcl +module "gcve-pc" { + source = "./fabric/modules/gcve-private-cloud" + name = "gcve-pc" + project_id = "gcve-test-project" + zone = "asia-southeast1-a" + management_cidr = "192.168.0.0/24" + + management_cluster_config = { + node_type_id = "standard-72" + node_count = 6 + custom_core_count = 28 + } + + private_connections = { + transit-conn1 = { + name = "transit-conn1", + network_self_link = "projects/test-prj-elia-01/global/networks/default", + peering = "servicenetworking-googleapis-com" + type = "PRIVATE_SERVICE_ACCESS", + routing_mode = "REGIONAL" + } + } +} +# tftest modules=1 resources=2 inventory=custom.yaml +``` + + + +## Files + +| name | description | resources | +|---|---|---| +| [main.tf](./main.tf) | Module-level locals and resources. | google_vmwareengine_network · google_vmwareengine_private_cloud | +| [output.tf](./output.tf) | None | | +| [variables.tf](./variables.tf) | Module variables. | | +| [versions.tf](./versions.tf) | Version pins. | | + +## Variables + +| name | description | type | required | default | +|---|---|:---:|:---:|:---:| +| [management_cidr](variables.tf#L23) | vSphere/vSAN subnets CIDR range. | string | ✓ | | +| [name](variables.tf#L42) | Private cloud name. | string | ✓ | | +| [project_id](variables.tf#L74) | Project id. | string | ✓ | | +| [zone](variables.tf#L85) | Private cloud zone. | string | ✓ | | +| [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | +| [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | +| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [vmwareengine_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | + diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf new file mode 100644 index 00000000..3f184475 --- /dev/null +++ b/modules/gcve-private-cloud/main.tf @@ -0,0 +1,74 @@ +/** + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +locals { + region = join("-", slice(split("-", "${var.zone}"), 0, 2)) + vmwareengine_network = ( + var.vmwareengine_network_create + ? try(google_vmwareengine_network.private-cloud-network.0, null) + : try(data.google_vmwareengine_network.private-cloud-network.0, null) + ) + psa_peering = { + for k, v in data.google_compute_network_peering.psa_peering : k => slice(split("/", "${v.peer_network}"), 6, 7)[0] + } +} + +data "google_vmwareengine_network" "private-cloud-network" { + count = var.vmwareengine_network_create ? 0 : 1 + provider = google-beta + project = var.project_id + name = "${local.region}-default" + location = local.region +} + + +data "google_compute_network_peering" "psa_peering" { + for_each = var.private_connections + name = each.value.peering + network = each.value.network_self_link +} + +resource "google_vmwareengine_private_cloud" "private-cloud" { + provider = google-beta + project = var.project_id + location = var.zone + name = var.name + description = var.description + + network_config { + management_cidr = var.management_cidr + vmware_engine_network = local.vmwareengine_network.id + } + + management_cluster { + cluster_id = "${var.name}-mgmt-cluster" + node_type_configs { + node_type_id = var.management_cluster_config.node_type_id + node_count = var.management_cluster_config.node_count + custom_core_count = var.management_cluster_config.custom_core_count + } + } +} + +resource "google_vmwareengine_network" "private-cloud-network" { + count = var.vmwareengine_network_create ? 1 : 0 + provider = google-beta + project = var.project_id + name = "${local.region}-default" + location = local.region + type = "LEGACY" + description = "Private cloud ${var.name} network." +} diff --git a/modules/gcve-private-cloud/output.tf b/modules/gcve-private-cloud/output.tf new file mode 100644 index 00000000..f1af67ec --- /dev/null +++ b/modules/gcve-private-cloud/output.tf @@ -0,0 +1,71 @@ +/** + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +output "hcx" { + description = "Details about a HCX Cloud Manager appliance." + value = google_vmwareengine_private_cloud.private-cloud.hcx +} + +output "id" { + description = "ID of the private cloud" + value = google_vmwareengine_private_cloud.private-cloud.id +} + +output "management_cluster" { + description = "Details of the management cluster of the private cloud" + value = google_vmwareengine_private_cloud.private-cloud.management_cluster +} + +output "network_config" { + description = "Details about the network configuration of the private cloud" + value = google_vmwareengine_private_cloud.private-cloud.network_config +} + +output "nsx" { + description = "Details about a NSX Manager appliance." + value = google_vmwareengine_private_cloud.private-cloud.nsx +} + +output "private-cloud" { + description = "The private cloud resource" + value = google_vmwareengine_private_cloud.private-cloud +} + +output "vcenter" { + description = "Details about a vCenter Server management appliance." + value = google_vmwareengine_private_cloud.private-cloud.vcenter +} + +output "state" { + description = "Details about the state of the private cloud" + value = google_vmwareengine_private_cloud.private-cloud.state +} + +output "private_connections_setup" { + description = "Cloud SDK commands for the private connections manual setup." + value = { + for k, v in var.private_connections : k => < Date: Mon, 14 Aug 2023 14:41:33 +0200 Subject: [PATCH 02/22] Added link to GCVE module --- README.md | 2 +- modules/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bae85ce4..c7b6d94c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Currently available modules: - **foundational** - [billing budget](./modules/billing-budget), [Cloud Identity group](./modules/cloud-identity-group/), [folder](./modules/folder), [service accounts](./modules/iam-service-account), [logging bucket](./modules/logging-bucket), [organization](./modules/organization), [project](./modules/project), [projects-data-source](./modules/projects-data-source) - **networking** - [DNS](./modules/dns), [DNS Response Policy](./modules/dns-response-policy/), [Cloud Endpoints](./modules/endpoints), [address reservation](./modules/net-address), [NAT](./modules/net-cloudnat), [VLAN Attachment](./modules/net-vlan-attachment/), [External Application LB](./modules/net-lb-app-ext/), [External Passthrough Network LB](./modules/net-lb-ext), [Internal Application LB](./modules/net-lb-app-int), [Internal Passthrough Network LB](./modules/net-lb-int), [Internal Proxy Network LB](./modules/net-lb-proxy-int), [IPSec over Interconnect](./modules/net-ipsec-over-interconnect), [VPC](./modules/net-vpc), [VPC firewall](./modules/net-vpc-firewall), [VPC firewall policy](./modules/net-vpc-firewall-policy), [VPC peering](./modules/net-vpc-peering), [VPN dynamic](./modules/net-vpn-dynamic), [HA VPN](./modules/net-vpn-ha), [VPN static](./modules/net-vpn-static), [Service Directory](./modules/service-directory), [Secure Web Proxy](./modules/net-swp) -- **compute** - [VM/VM group](./modules/compute-vm), [MIG](./modules/compute-mig), [COS container](./modules/cloud-config-container/cos-generic-metadata/) (coredns, mysql, onprem, squid), [GKE cluster](./modules/gke-cluster-standard), [GKE hub](./modules/gke-hub), [GKE nodepool](./modules/gke-nodepool) +- **compute** - [VM/VM group](./modules/compute-vm), [MIG](./modules/compute-mig), [COS container](./modules/cloud-config-container/cos-generic-metadata/) (coredns, mysql, onprem, squid), [GKE cluster](./modules/gke-cluster-standard), [GKE hub](./modules/gke-hub), [GKE nodepool](./modules/gke-nodepool), [GCVE private cloud](./modules/gcve-private-cloud) - **data** - [AlloyDB instance](./modules/alloydb-instance), [BigQuery dataset](./modules/bigquery-dataset), [Bigtable instance](./modules/bigtable-instance), [Dataplex](./modules/dataplex), [Dataplex DataScan](./modules/dataplex-datascan/), [Cloud SQL instance](./modules/cloudsql-instance), [Data Catalog Policy Tag](./modules/data-catalog-policy-tag), [Datafusion](./modules/datafusion), [Dataproc](./modules/dataproc), [GCS](./modules/gcs), [Pub/Sub](./modules/pubsub) - **development** - [API Gateway](./modules/api-gateway), [Apigee](./modules/apigee), [Artifact Registry](./modules/artifact-registry), [Container Registry](./modules/container-registry), [Cloud Source Repository](./modules/source-repository) - **security** - [Binauthz](./modules/binauthz/), [KMS](./modules/kms), [SecretManager](./modules/secret-manager), [VPC Service Control](./modules/vpc-sc) diff --git a/modules/README.md b/modules/README.md index 653c25e8..8aab0cb3 100644 --- a/modules/README.md +++ b/modules/README.md @@ -70,6 +70,7 @@ These modules are used in the examples included in this repository. If you are u - [GKE standard cluster](./gke-cluster-standard) - [GKE hub](./gke-hub) - [GKE nodepool](./gke-nodepool) +- [GCVE private cloud](./gcve-private-cloud) ## Data From a7fd3e26162283496112e02bf6f6175a17d30b82 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 09:25:44 +0200 Subject: [PATCH 03/22] fixed file name --- modules/gcve-private-cloud/{output.tf => outputs.tf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/gcve-private-cloud/{output.tf => outputs.tf} (100%) diff --git a/modules/gcve-private-cloud/output.tf b/modules/gcve-private-cloud/outputs.tf similarity index 100% rename from modules/gcve-private-cloud/output.tf rename to modules/gcve-private-cloud/outputs.tf From 77d80a40c389e57e12759d3cfe68ae4756bedd64 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 09:34:18 +0200 Subject: [PATCH 04/22] added link to GCVE module --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c7b6d94c..6d67d06b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The current list of modules supports most of the core foundational and networkin Currently available modules: - **foundational** - [billing budget](./modules/billing-budget), [Cloud Identity group](./modules/cloud-identity-group/), [folder](./modules/folder), [service accounts](./modules/iam-service-account), [logging bucket](./modules/logging-bucket), [organization](./modules/organization), [project](./modules/project), [projects-data-source](./modules/projects-data-source) -- **networking** - [DNS](./modules/dns), [DNS Response Policy](./modules/dns-response-policy/), [Cloud Endpoints](./modules/endpoints), [address reservation](./modules/net-address), [NAT](./modules/net-cloudnat), [VLAN Attachment](./modules/net-vlan-attachment/), [External Application LB](./modules/net-lb-app-ext/), [External Passthrough Network LB](./modules/net-lb-ext), [Internal Application LB](./modules/net-lb-app-int), [Internal Passthrough Network LB](./modules/net-lb-int), [Internal Proxy Network LB](./modules/net-lb-proxy-int), [IPSec over Interconnect](./modules/net-ipsec-over-interconnect), [VPC](./modules/net-vpc), [VPC firewall](./modules/net-vpc-firewall), [VPC firewall policy](./modules/net-vpc-firewall-policy), [VPC peering](./modules/net-vpc-peering), [VPN dynamic](./modules/net-vpn-dynamic), [HA VPN](./modules/net-vpn-ha), [VPN static](./modules/net-vpn-static), [Service Directory](./modules/service-directory), [Secure Web Proxy](./modules/net-swp) +- **networking** - [DNS](./modules/dns), [DNS Response Policy](./modules/dns-response-policy/), [Cloud Endpoints](./modules/endpoints), [address reservation](./modules/net-address), [NAT](./modules/net-cloudnat), [VLAN Attachment](./modules/net-vlan-attachment/), [External Application LB](./modules/net-lb-app-ext/), [External Passthrough Network LB](./modules/net-lb-ext), [Firewall policy](./modules/net-firewall-policy), [Internal Application LB](./modules/net-lb-app-int), [Internal Passthrough Network LB](./modules/net-lb-int), [Internal Proxy Network LB](./modules/net-lb-proxy-int), [IPSec over Interconnect](./modules/net-ipsec-over-interconnect), [VPC](./modules/net-vpc), [VPC firewall](./modules/net-vpc-firewall), [VPC peering](./modules/net-vpc-peering), [VPN dynamic](./modules/net-vpn-dynamic), [HA VPN](./modules/net-vpn-ha), [VPN static](./modules/net-vpn-static), [Service Directory](./modules/service-directory), [Secure Web Proxy](./modules/net-swp) - **compute** - [VM/VM group](./modules/compute-vm), [MIG](./modules/compute-mig), [COS container](./modules/cloud-config-container/cos-generic-metadata/) (coredns, mysql, onprem, squid), [GKE cluster](./modules/gke-cluster-standard), [GKE hub](./modules/gke-hub), [GKE nodepool](./modules/gke-nodepool), [GCVE private cloud](./modules/gcve-private-cloud) - **data** - [AlloyDB instance](./modules/alloydb-instance), [BigQuery dataset](./modules/bigquery-dataset), [Bigtable instance](./modules/bigtable-instance), [Dataplex](./modules/dataplex), [Dataplex DataScan](./modules/dataplex-datascan/), [Cloud SQL instance](./modules/cloudsql-instance), [Data Catalog Policy Tag](./modules/data-catalog-policy-tag), [Datafusion](./modules/datafusion), [Dataproc](./modules/dataproc), [GCS](./modules/gcs), [Pub/Sub](./modules/pubsub) - **development** - [API Gateway](./modules/api-gateway), [Apigee](./modules/apigee), [Artifact Registry](./modules/artifact-registry), [Container Registry](./modules/container-registry), [Cloud Source Repository](./modules/source-repository) From e927bf3858a1ec9ff2083f294811ff28d93fca97 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 09:37:48 +0200 Subject: [PATCH 05/22] Fixed typo --- modules/gcve-private-cloud/README.md | 42 ++++++++++++++----------- modules/gcve-private-cloud/main.tf | 15 ++++----- modules/gcve-private-cloud/variables.tf | 10 ++++-- 3 files changed, 39 insertions(+), 28 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index 8baad718..ab374c08 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -1,8 +1,8 @@ # Google Cloud VMWare Engine Private Cloud Module -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. +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. -Be aware that the deployment of this module might requires up to 2 hours depending on the selected private cloud target zone. +Be aware that the deployment of this module might require up to 2 hours depending on the selected private cloud target zone. ## TOC @@ -11,14 +11,14 @@ Be aware that the deployment of this module might requires up to 2 hours dependi - [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) -- [Files](#files) - [Variables](#variables) +- [Outputs](#outputs) ## Limitations At the moment this module doesn't support the following use cases: -- `Single node private cloud` -- `Stretched private cloud` +- Single node private cloud +- Stretched private cloud ## Basic Private Cloud Creation @@ -70,18 +70,7 @@ module "gcve-pc" { } # tftest modules=1 resources=2 inventory=custom.yaml ``` - - -## Files - -| name | description | resources | -|---|---|---| -| [main.tf](./main.tf) | Module-level locals and resources. | google_vmwareengine_network · google_vmwareengine_private_cloud | -| [output.tf](./output.tf) | None | | -| [variables.tf](./variables.tf) | Module variables. | | -| [versions.tf](./versions.tf) | Version pins. | | - ## Variables | name | description | type | required | default | @@ -89,9 +78,24 @@ module "gcve-pc" { | [management_cidr](variables.tf#L23) | vSphere/vSAN subnets CIDR range. | string | ✓ | | | [name](variables.tf#L42) | Private cloud name. | string | ✓ | | | [project_id](variables.tf#L74) | Project id. | string | ✓ | | -| [zone](variables.tf#L85) | Private cloud zone. | string | ✓ | | +| [zone](variables.tf#L91) | Private cloud zone. | string | ✓ | | | [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | | [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | -| [vmwareengine_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | +| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [vmw_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | +| [vmw_network_description](variables.tf#L85) | VMware Engine network description. | string | | "Terraform-managed." | + +## Outputs + +| name | description | sensitive | +|---|---|:---:| +| [hcx](outputs.tf#L17) | Details about a HCX Cloud Manager appliance. | | +| [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 | | +| [nsx](outputs.tf#L37) | Details about a NSX Manager appliance. | | +| [private-cloud](outputs.tf#L42) | The private cloud resource | | +| [private_connections_setup](outputs.tf#L57) | Cloud SDK commands for the private connections manual setup. | | +| [state](outputs.tf#L52) | Details about the state of the private cloud | | +| [vcenter](outputs.tf#L47) | Details about a vCenter Server management appliance. | | diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf index 3f184475..2568f29d 100644 --- a/modules/gcve-private-cloud/main.tf +++ b/modules/gcve-private-cloud/main.tf @@ -16,18 +16,19 @@ locals { region = join("-", slice(split("-", "${var.zone}"), 0, 2)) - vmwareengine_network = ( - var.vmwareengine_network_create + vmw_network = ( + var.vmw_network_create ? try(google_vmwareengine_network.private-cloud-network.0, null) : try(data.google_vmwareengine_network.private-cloud-network.0, null) ) psa_peering = { - for k, v in data.google_compute_network_peering.psa_peering : k => slice(split("/", "${v.peer_network}"), 6, 7)[0] + for k, v in data.google_compute_network_peering.psa_peering : + k => slice(split("/", "${v.peer_network}"), 6, 7)[0] } } data "google_vmwareengine_network" "private-cloud-network" { - count = var.vmwareengine_network_create ? 0 : 1 + count = var.vmw_network_create ? 0 : 1 provider = google-beta project = var.project_id name = "${local.region}-default" @@ -50,7 +51,7 @@ resource "google_vmwareengine_private_cloud" "private-cloud" { network_config { management_cidr = var.management_cidr - vmware_engine_network = local.vmwareengine_network.id + vmware_engine_network = local.vmw_network.id } management_cluster { @@ -64,11 +65,11 @@ resource "google_vmwareengine_private_cloud" "private-cloud" { } resource "google_vmwareengine_network" "private-cloud-network" { - count = var.vmwareengine_network_create ? 1 : 0 + count = var.vmw_network_create ? 1 : 0 provider = google-beta project = var.project_id name = "${local.region}-default" location = local.region type = "LEGACY" - description = "Private cloud ${var.name} network." + description = var.vmw_network_description } diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index 05183e0d..61e5b1d4 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -48,9 +48,9 @@ variable "private_connections" { description = "VMWare private connections configuration. It is used to create the gcloud command printed as output." type = map(object({ name = string - description = optional(string, "Terraform-managed.") network_self_link = string peering = string + description = optional(string, "Terraform-managed.") type = optional(string, "REGIONAL") routing_mode = optional(string, "PRIVATE_SERVICE_ACCESS") })) @@ -76,12 +76,18 @@ variable "project_id" { type = string } -variable "vmwareengine_network_create" { +variable "vmw_network_create" { description = "Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network." type = bool default = true } +variable "vmw_network_description" { + description = " VMware Engine network description." + type = string + default = "Terraform-managed." +} + variable "zone" { description = "Private cloud zone." type = string From 8e9d544be675c957285f4116de9afa97f2d74b95 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 12:04:48 +0200 Subject: [PATCH 06/22] fixed description --- tests/modules/gcve_private_cloud/examples/basic.yaml | 2 ++ tests/modules/gcve_private_cloud/examples/custom.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/modules/gcve_private_cloud/examples/basic.yaml b/tests/modules/gcve_private_cloud/examples/basic.yaml index c4d9e3d5..b91dcf58 100644 --- a/tests/modules/gcve_private_cloud/examples/basic.yaml +++ b/tests/modules/gcve_private_cloud/examples/basic.yaml @@ -14,12 +14,14 @@ values: module.gcve-pc.google_vmwareengine_network.private-cloud-network[0]: + description: Terraform-managed. location: asia-southeast1 name: asia-southeast1-default project: gcve-test-project timeouts: null type: LEGACY module.gcve-pc.google_vmwareengine_private_cloud.private-cloud: + description: Terraform-managed. location: asia-southeast1-a management_cluster: - cluster_id: gcve-pc-mgmt-cluster diff --git a/tests/modules/gcve_private_cloud/examples/custom.yaml b/tests/modules/gcve_private_cloud/examples/custom.yaml index 60bbf682..4c813e2c 100644 --- a/tests/modules/gcve_private_cloud/examples/custom.yaml +++ b/tests/modules/gcve_private_cloud/examples/custom.yaml @@ -14,7 +14,7 @@ values: module.gcve-pc.google_vmwareengine_network.private-cloud-network[0]: - description: Private cloud gcve-pc network. + description: Terraform-managed. location: asia-southeast1 name: asia-southeast1-default project: gcve-test-project From 0e2ee8bcebe9017862669c68e38114692ac5f7e2 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 12:05:44 +0200 Subject: [PATCH 07/22] fixed typo --- modules/gcve-private-cloud/README.md | 11 +++++------ modules/gcve-private-cloud/main.tf | 2 +- modules/gcve-private-cloud/variables.tf | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index ab374c08..df472334 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -2,12 +2,11 @@ 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. +To undersatnd the limits and to propertly configure the vSphere/vSAN subnets CIDR range please refer to the [GCVE public documetation](https://cloud.google.com/vmware-engine/docs/quickstart-networking-requirements). + Be aware that the deployment of this module might require up to 2 hours depending on the selected private cloud target zone. -## TOC - -- [TOC](#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) @@ -34,7 +33,7 @@ module "gcve-pc" { transit-conn1 = { name = "transit-conn1", network_self_link = "projects/test-prj-elia-01/global/networks/default", - peering = "servicenetworking-googleapis-com" + peering_name = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" } @@ -62,7 +61,7 @@ module "gcve-pc" { transit-conn1 = { name = "transit-conn1", network_self_link = "projects/test-prj-elia-01/global/networks/default", - peering = "servicenetworking-googleapis-com" + peering_name = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" } @@ -81,7 +80,7 @@ module "gcve-pc" { | [zone](variables.tf#L91) | Private cloud zone. | string | ✓ | | | [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | | [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | | [vmw_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | | [vmw_network_description](variables.tf#L85) | VMware Engine network description. | string | | "Terraform-managed." | diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf index 2568f29d..13b915b7 100644 --- a/modules/gcve-private-cloud/main.tf +++ b/modules/gcve-private-cloud/main.tf @@ -38,7 +38,7 @@ data "google_vmwareengine_network" "private-cloud-network" { data "google_compute_network_peering" "psa_peering" { for_each = var.private_connections - name = each.value.peering + name = each.value.peering_name network = each.value.network_self_link } diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index 61e5b1d4..c1586f41 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -49,7 +49,7 @@ variable "private_connections" { type = map(object({ name = string network_self_link = string - peering = string + peering_name = string description = optional(string, "Terraform-managed.") type = optional(string, "REGIONAL") routing_mode = optional(string, "PRIVATE_SERVICE_ACCESS") From 3feaad0c1cadff21552b1ceb0ffaf5ee37b4a102 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 12:10:44 +0200 Subject: [PATCH 08/22] fixed variable name --- modules/gcve-private-cloud/README.md | 4 ++-- modules/gcve-private-cloud/main.tf | 2 +- modules/gcve-private-cloud/variables.tf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index df472334..2b85cd31 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -33,7 +33,7 @@ module "gcve-pc" { transit-conn1 = { name = "transit-conn1", network_self_link = "projects/test-prj-elia-01/global/networks/default", - peering_name = "servicenetworking-googleapis-com" + psa_peering = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" } @@ -61,7 +61,7 @@ module "gcve-pc" { transit-conn1 = { name = "transit-conn1", network_self_link = "projects/test-prj-elia-01/global/networks/default", - peering_name = "servicenetworking-googleapis-com" + psa_peering = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" } diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf index 13b915b7..c7837978 100644 --- a/modules/gcve-private-cloud/main.tf +++ b/modules/gcve-private-cloud/main.tf @@ -38,7 +38,7 @@ data "google_vmwareengine_network" "private-cloud-network" { data "google_compute_network_peering" "psa_peering" { for_each = var.private_connections - name = each.value.peering_name + name = each.value.psa_peering network = each.value.network_self_link } diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index c1586f41..69c083a4 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -49,7 +49,7 @@ variable "private_connections" { type = map(object({ name = string network_self_link = string - peering_name = string + psa_peering = string description = optional(string, "Terraform-managed.") type = optional(string, "REGIONAL") routing_mode = optional(string, "PRIVATE_SERVICE_ACCESS") From 739bbf1aefcc8e4b0dfd6b79055ed6f539de3c5f Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 12:11:42 +0200 Subject: [PATCH 09/22] fixed variable name --- modules/gcve-private-cloud/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index 2b85cd31..4c9785f3 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -80,7 +80,7 @@ module "gcve-pc" { | [zone](variables.tf#L91) | Private cloud zone. | string | ✓ | | | [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | | [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | | [vmw_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | | [vmw_network_description](variables.tf#L85) | VMware Engine network description. | string | | "Terraform-managed." | From c6f5d47c66f7e4361f3b197e86f643254bd404eb Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 12:19:47 +0200 Subject: [PATCH 10/22] fixed variable name --- modules/gcve-private-cloud/README.md | 6 +++--- modules/gcve-private-cloud/main.tf | 2 +- modules/gcve-private-cloud/variables.tf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index 4c9785f3..df472334 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -33,7 +33,7 @@ module "gcve-pc" { transit-conn1 = { name = "transit-conn1", network_self_link = "projects/test-prj-elia-01/global/networks/default", - psa_peering = "servicenetworking-googleapis-com" + peering_name = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" } @@ -61,7 +61,7 @@ module "gcve-pc" { transit-conn1 = { name = "transit-conn1", network_self_link = "projects/test-prj-elia-01/global/networks/default", - psa_peering = "servicenetworking-googleapis-com" + peering_name = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" } @@ -80,7 +80,7 @@ module "gcve-pc" { | [zone](variables.tf#L91) | Private cloud zone. | string | ✓ | | | [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | | [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | | [vmw_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | | [vmw_network_description](variables.tf#L85) | VMware Engine network description. | string | | "Terraform-managed." | diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf index c7837978..13b915b7 100644 --- a/modules/gcve-private-cloud/main.tf +++ b/modules/gcve-private-cloud/main.tf @@ -38,7 +38,7 @@ data "google_vmwareengine_network" "private-cloud-network" { data "google_compute_network_peering" "psa_peering" { for_each = var.private_connections - name = each.value.psa_peering + name = each.value.peering_name network = each.value.network_self_link } diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index 69c083a4..c1586f41 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -49,7 +49,7 @@ variable "private_connections" { type = map(object({ name = string network_self_link = string - psa_peering = string + peering_name = string description = optional(string, "Terraform-managed.") type = optional(string, "REGIONAL") routing_mode = optional(string, "PRIVATE_SERVICE_ACCESS") From 6a5739bf91f672cbd2efe75a7195021f346ee2bf Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Thu, 17 Aug 2023 12:25:33 +0200 Subject: [PATCH 11/22] gcve net requirements link --- modules/gcve-private-cloud/README.md | 4 ++-- modules/gcve-private-cloud/variables.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index df472334..0c3fe404 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -2,7 +2,7 @@ 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. -To undersatnd the limits and to propertly configure the vSphere/vSAN subnets CIDR range please refer to the [GCVE public documetation](https://cloud.google.com/vmware-engine/docs/quickstart-networking-requirements). +To understand the limits and to propertly configure the vSphere/vSAN subnets CIDR range please refer to the [GCVE public documetation](https://cloud.google.com/vmware-engine/docs/quickstart-networking-requirements). Be aware that the deployment of this module might require up to 2 hours depending on the selected private cloud target zone. @@ -74,7 +74,7 @@ module "gcve-pc" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [management_cidr](variables.tf#L23) | vSphere/vSAN subnets CIDR range. | string | ✓ | | +| [management_cidr](variables.tf#L23) | 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). | string | ✓ | | | [name](variables.tf#L42) | Private cloud name. | string | ✓ | | | [project_id](variables.tf#L74) | Project id. | string | ✓ | | | [zone](variables.tf#L91) | Private cloud zone. | string | ✓ | | diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index c1586f41..945b5b10 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -21,7 +21,7 @@ variable "description" { } variable "management_cidr" { - description = "vSphere/vSAN subnets CIDR range." + description = "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)." type = string } From 5a298780c1152ee6cf86c1113e84a4021db2bf2b Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 11:19:35 +0200 Subject: [PATCH 12/22] changed variable name --- tests/modules/gcve_private_cloud/examples/basic.yaml | 8 ++++---- tests/modules/gcve_private_cloud/examples/custom.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/modules/gcve_private_cloud/examples/basic.yaml b/tests/modules/gcve_private_cloud/examples/basic.yaml index b91dcf58..5c314b0e 100644 --- a/tests/modules/gcve_private_cloud/examples/basic.yaml +++ b/tests/modules/gcve_private_cloud/examples/basic.yaml @@ -15,14 +15,14 @@ values: module.gcve-pc.google_vmwareengine_network.private-cloud-network[0]: description: Terraform-managed. - location: asia-southeast1 - name: asia-southeast1-default + location: europe-west8 + name: europe-west8-default project: gcve-test-project timeouts: null type: LEGACY module.gcve-pc.google_vmwareengine_private_cloud.private-cloud: description: Terraform-managed. - location: asia-southeast1-a + location: europe-west8-a management_cluster: - cluster_id: gcve-pc-mgmt-cluster node_type_configs: @@ -31,7 +31,7 @@ values: node_type_id: standard-72 name: gcve-pc network_config: - - management_cidr: 192.168.0.0/24 + - cidr: 192.168.0.0/24 project: gcve-test-project timeouts: null diff --git a/tests/modules/gcve_private_cloud/examples/custom.yaml b/tests/modules/gcve_private_cloud/examples/custom.yaml index 4c813e2c..6869f4d8 100644 --- a/tests/modules/gcve_private_cloud/examples/custom.yaml +++ b/tests/modules/gcve_private_cloud/examples/custom.yaml @@ -15,14 +15,14 @@ values: module.gcve-pc.google_vmwareengine_network.private-cloud-network[0]: description: Terraform-managed. - location: asia-southeast1 - name: asia-southeast1-default + location: europe-west8 + name: europe-west8-default project: gcve-test-project timeouts: null type: LEGACY module.gcve-pc.google_vmwareengine_private_cloud.private-cloud: description: Terraform-managed. - location: asia-southeast1-a + location: europe-west8-a management_cluster: - cluster_id: gcve-pc-mgmt-cluster node_type_configs: @@ -31,7 +31,7 @@ values: node_type_id: standard-72 name: gcve-pc network_config: - - management_cidr: 192.168.0.0/24 + - cidr: 192.168.0.0/24 project: gcve-test-project timeouts: null From d568408331d6ae3b25c11ff9b7d88206693732e2 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 11:20:27 +0200 Subject: [PATCH 13/22] fixed variable name and regex --- modules/gcve-private-cloud/README.md | 32 ++++++++++++------------- modules/gcve-private-cloud/main.tf | 7 +++--- modules/gcve-private-cloud/outputs.tf | 24 +++++++++++-------- modules/gcve-private-cloud/variables.tf | 10 ++++---- 4 files changed, 40 insertions(+), 33 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index 0c3fe404..93e9271e 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -26,13 +26,13 @@ module "gcve-pc" { source = "./fabric/modules/gcve-private-cloud" name = "gcve-pc" project_id = "gcve-test-project" - zone = "asia-southeast1-a" - management_cidr = "192.168.0.0/24" + zone = "europe-west8-a" + cidr = "192.168.0.0/24" private_connections = { transit-conn1 = { name = "transit-conn1", - network_self_link = "projects/test-prj-elia-01/global/networks/default", + network_self_link = "projects/test-prj-gcve-01/global/networks/default", peering_name = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" @@ -48,8 +48,8 @@ module "gcve-pc" { source = "./fabric/modules/gcve-private-cloud" name = "gcve-pc" project_id = "gcve-test-project" - zone = "asia-southeast1-a" - management_cidr = "192.168.0.0/24" + zone = "europe-west8-a" + cidr = "192.168.0.0/24" management_cluster_config = { node_type_id = "standard-72" @@ -60,7 +60,7 @@ module "gcve-pc" { private_connections = { transit-conn1 = { name = "transit-conn1", - network_self_link = "projects/test-prj-elia-01/global/networks/default", + network_self_link = "projects/test-prj-gcve-01/global/networks/default", peering_name = "servicenetworking-googleapis-com" type = "PRIVATE_SERVICE_ACCESS", routing_mode = "REGIONAL" @@ -74,15 +74,15 @@ module "gcve-pc" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [management_cidr](variables.tf#L23) | 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). | string | ✓ | | -| [name](variables.tf#L42) | Private cloud name. | string | ✓ | | -| [project_id](variables.tf#L74) | Project id. | string | ✓ | | -| [zone](variables.tf#L91) | Private cloud zone. | string | ✓ | | +| [cidr](variables.tf#L23) | 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). | string | ✓ | | +| [name](variables.tf#L43) | Private cloud name. | string | ✓ | | +| [project_id](variables.tf#L76) | Project id. | string | ✓ | | +| [zone](variables.tf#L93) | Private cloud zone. | string | ✓ | | | [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | | [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | -| [vmw_network_create](variables.tf#L79) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | -| [vmw_network_description](variables.tf#L85) | VMware Engine network description. | string | | "Terraform-managed." | +| [private_connections](variables.tf#L48) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [vmw_network_create](variables.tf#L81) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | +| [vmw_network_description](variables.tf#L87) | VMware Engine network description. | string | | "Terraform-managed." | ## Outputs @@ -94,7 +94,7 @@ module "gcve-pc" { | [network_config](outputs.tf#L32) | Details about the network configuration of the private cloud | | | [nsx](outputs.tf#L37) | Details about a NSX Manager appliance. | | | [private-cloud](outputs.tf#L42) | The private cloud resource | | -| [private_connections_setup](outputs.tf#L57) | Cloud SDK commands for the private connections manual setup. | | -| [state](outputs.tf#L52) | Details about the state of the private cloud | | -| [vcenter](outputs.tf#L47) | Details about a vCenter Server management appliance. | | +| [private_connections_setup](outputs.tf#L47) | Cloud SDK commands for the private connections manual setup. | | +| [state](outputs.tf#L63) | Details about the state of the private cloud | | +| [vcenter](outputs.tf#L68) | Details about a vCenter Server management appliance. | | diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf index 13b915b7..875798d2 100644 --- a/modules/gcve-private-cloud/main.tf +++ b/modules/gcve-private-cloud/main.tf @@ -15,7 +15,7 @@ */ locals { - region = join("-", slice(split("-", "${var.zone}"), 0, 2)) + region = regex("([a-z]*-[a-z]*[0-9]{1,2})-([a-z])", var.zone)[0] vmw_network = ( var.vmw_network_create ? try(google_vmwareengine_network.private-cloud-network.0, null) @@ -23,7 +23,7 @@ locals { ) psa_peering = { for k, v in data.google_compute_network_peering.psa_peering : - k => slice(split("/", "${v.peer_network}"), 6, 7)[0] + k => regex("(.*)/projects/([a-z0-9-]*)/(.*)", "${v.peer_network}")[1] } } @@ -35,6 +35,7 @@ data "google_vmwareengine_network" "private-cloud-network" { location = local.region } +#TO REMOVE? data "google_compute_network_peering" "psa_peering" { for_each = var.private_connections @@ -50,7 +51,7 @@ resource "google_vmwareengine_private_cloud" "private-cloud" { description = var.description network_config { - management_cidr = var.management_cidr + management_cidr = var.cidr vmware_engine_network = local.vmw_network.id } diff --git a/modules/gcve-private-cloud/outputs.tf b/modules/gcve-private-cloud/outputs.tf index f1af67ec..ff60b349 100644 --- a/modules/gcve-private-cloud/outputs.tf +++ b/modules/gcve-private-cloud/outputs.tf @@ -44,16 +44,6 @@ output "private-cloud" { value = google_vmwareengine_private_cloud.private-cloud } -output "vcenter" { - description = "Details about a vCenter Server management appliance." - value = google_vmwareengine_private_cloud.private-cloud.vcenter -} - -output "state" { - description = "Details about the state of the private cloud" - value = google_vmwareengine_private_cloud.private-cloud.state -} - output "private_connections_setup" { description = "Cloud SDK commands for the private connections manual setup." value = { @@ -69,3 +59,17 @@ output "private_connections_setup" { EOT } } + +output "state" { + description = "Details about the state of the private cloud" + value = google_vmwareengine_private_cloud.private-cloud.state +} + +output "vcenter" { + description = "Details about a vCenter Server management appliance." + value = google_vmwareengine_private_cloud.private-cloud.vcenter +} + +output "test" { + value = data.google_compute_network_peering.psa_peering +} diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index 945b5b10..1449476b 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -20,7 +20,7 @@ variable "description" { default = "Terraform-managed." } -variable "management_cidr" { +variable "cidr" { description = "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)." type = string } @@ -37,6 +37,7 @@ variable "management_cluster_config" { node_count = 3, custom_core_count = null } + nullable = false } variable "name" { @@ -51,10 +52,11 @@ variable "private_connections" { network_self_link = string peering_name = string description = optional(string, "Terraform-managed.") - type = optional(string, "REGIONAL") - routing_mode = optional(string, "PRIVATE_SERVICE_ACCESS") + type = optional(string, "PRIVATE_SERVICE_ACCESS") + routing_mode = optional(string, "REGIONAL") })) - default = {} + default = {} + nullable = false validation { condition = alltrue([ for r in var.private_connections : From e762e93677160daf8c3a14602d4e6c882f093cc6 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 15:37:32 +0200 Subject: [PATCH 14/22] fixed variable names --- tests/modules/gcve_private_cloud/examples/basic.yaml | 2 +- tests/modules/gcve_private_cloud/examples/custom.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/gcve_private_cloud/examples/basic.yaml b/tests/modules/gcve_private_cloud/examples/basic.yaml index 5c314b0e..ec6544f6 100644 --- a/tests/modules/gcve_private_cloud/examples/basic.yaml +++ b/tests/modules/gcve_private_cloud/examples/basic.yaml @@ -31,7 +31,7 @@ values: node_type_id: standard-72 name: gcve-pc network_config: - - cidr: 192.168.0.0/24 + - management_cidr: 192.168.0.0/24 project: gcve-test-project timeouts: null diff --git a/tests/modules/gcve_private_cloud/examples/custom.yaml b/tests/modules/gcve_private_cloud/examples/custom.yaml index 6869f4d8..2a413d18 100644 --- a/tests/modules/gcve_private_cloud/examples/custom.yaml +++ b/tests/modules/gcve_private_cloud/examples/custom.yaml @@ -31,7 +31,7 @@ values: node_type_id: standard-72 name: gcve-pc network_config: - - cidr: 192.168.0.0/24 + - management_cidr: 192.168.0.0/24 project: gcve-test-project timeouts: null From 87e82244afa777f646f9975cf28e005793acabb9 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 15:38:35 +0200 Subject: [PATCH 15/22] fixed tests --- modules/gcve-private-cloud/README.md | 51 +++++++++++++------------ modules/gcve-private-cloud/main.tf | 11 +++--- modules/gcve-private-cloud/outputs.tf | 2 +- modules/gcve-private-cloud/variables.tf | 21 +++++++--- 4 files changed, 47 insertions(+), 38 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index 93e9271e..a0feefdd 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -23,19 +23,19 @@ At the moment this module doesn't support the following use cases: ```hcl module "gcve-pc" { - source = "./fabric/modules/gcve-private-cloud" - name = "gcve-pc" - project_id = "gcve-test-project" - zone = "europe-west8-a" - cidr = "192.168.0.0/24" + source = "./fabric/modules/gcve-private-cloud" + name = "gcve-pc" + project_id = "gcve-test-project" + zone = "europe-west8-a" + cidr = "192.168.0.0/24" private_connections = { transit-conn1 = { - name = "transit-conn1", - network_self_link = "projects/test-prj-gcve-01/global/networks/default", - peering_name = "servicenetworking-googleapis-com" - type = "PRIVATE_SERVICE_ACCESS", - routing_mode = "REGIONAL" + 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" } } } @@ -45,11 +45,11 @@ module "gcve-pc" { ```hcl module "gcve-pc" { - source = "./fabric/modules/gcve-private-cloud" - name = "gcve-pc" - project_id = "gcve-test-project" - zone = "europe-west8-a" - cidr = "192.168.0.0/24" + source = "./fabric/modules/gcve-private-cloud" + name = "gcve-pc" + project_id = "gcve-test-project" + zone = "europe-west8-a" + cidr = "192.168.0.0/24" management_cluster_config = { node_type_id = "standard-72" @@ -59,11 +59,11 @@ module "gcve-pc" { private_connections = { transit-conn1 = { - name = "transit-conn1", - network_self_link = "projects/test-prj-gcve-01/global/networks/default", - peering_name = "servicenetworking-googleapis-com" - type = "PRIVATE_SERVICE_ACCESS", - routing_mode = "REGIONAL" + 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" } } } @@ -76,13 +76,13 @@ module "gcve-pc" { |---|---|:---:|:---:|:---:| | [cidr](variables.tf#L23) | 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). | string | ✓ | | | [name](variables.tf#L43) | Private cloud name. | string | ✓ | | -| [project_id](variables.tf#L76) | Project id. | string | ✓ | | -| [zone](variables.tf#L93) | Private cloud zone. | string | ✓ | | +| [project_id](variables.tf#L85) | Project id. | string | ✓ | | +| [zone](variables.tf#L102) | Private cloud zone. | string | ✓ | | | [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | | [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L48) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | -| [vmw_network_create](variables.tf#L81) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | -| [vmw_network_description](variables.tf#L87) | VMware Engine network description. | string | | "Terraform-managed." | +| [private_connections](variables.tf#L48) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [vmw_network_create](variables.tf#L90) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | +| [vmw_network_description](variables.tf#L96) | VMware Engine network description. | string | | "Terraform-managed." | ## Outputs @@ -96,5 +96,6 @@ module "gcve-pc" { | [private-cloud](outputs.tf#L42) | The private cloud resource | | | [private_connections_setup](outputs.tf#L47) | Cloud SDK commands for the private connections manual setup. | | | [state](outputs.tf#L63) | Details about the state of the private cloud | | +| [test](outputs.tf#L73) | | | | [vcenter](outputs.tf#L68) | Details about a vCenter Server management appliance. | | diff --git a/modules/gcve-private-cloud/main.tf b/modules/gcve-private-cloud/main.tf index 875798d2..3235fb29 100644 --- a/modules/gcve-private-cloud/main.tf +++ b/modules/gcve-private-cloud/main.tf @@ -21,9 +21,10 @@ locals { ? try(google_vmwareengine_network.private-cloud-network.0, null) : try(data.google_vmwareengine_network.private-cloud-network.0, null) ) - psa_peering = { - for k, v in data.google_compute_network_peering.psa_peering : - k => regex("(.*)/projects/([a-z0-9-]*)/(.*)", "${v.peer_network}")[1] + tenant_host_project = { + for k, v in var.private_connections : k => v.tenant_host_project == null + ? regex("(.*)/projects/([a-z0-9-]*)/(.*)", "${data.google_compute_network_peering.psa_peering[k].peer_network}")[1] + : v.tenant_host_project } } @@ -35,10 +36,8 @@ data "google_vmwareengine_network" "private-cloud-network" { location = local.region } -#TO REMOVE? - data "google_compute_network_peering" "psa_peering" { - for_each = var.private_connections + for_each = { for k, v in var.private_connections : k => v if v.tenant_host_project == null } name = each.value.peering_name network = each.value.network_self_link } diff --git a/modules/gcve-private-cloud/outputs.tf b/modules/gcve-private-cloud/outputs.tf index ff60b349..76267f21 100644 --- a/modules/gcve-private-cloud/outputs.tf +++ b/modules/gcve-private-cloud/outputs.tf @@ -54,7 +54,7 @@ output "private_connections_setup" { --vmware-engine-network=${local.region}-default \ --description="${v.description}" \ --routing-mode=${v.routing_mode} \ - --service-project=${local.psa_peering[k]} \ + --service-project=${local.tenant_host_project[k]} \ --type=${v.type} EOT } diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index 1449476b..d81eb0b4 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -48,15 +48,24 @@ variable "name" { variable "private_connections" { description = "VMWare private connections configuration. It is used to create the gcloud command printed as output." type = map(object({ - name = string - network_self_link = string - peering_name = string - description = optional(string, "Terraform-managed.") - type = optional(string, "PRIVATE_SERVICE_ACCESS") - routing_mode = optional(string, "REGIONAL") + name = string + network_self_link = string + peering_name = optional(string) + tenant_host_project = optional(string) + description = optional(string, "Terraform-managed.") + type = optional(string, "PRIVATE_SERVICE_ACCESS") + routing_mode = optional(string, "REGIONAL") })) default = {} nullable = false + validation { + condition = alltrue([ + for k, v in var.private_connections : + (v.peering_name != null) != (v.tenant_host_project != null) + ] + ) + error_message = "Both peering_name and tenant_host_project variables have been set. Only one variable is allowed." + } validation { condition = alltrue([ for r in var.private_connections : From 81b567684b6d2450cac17062a42f7ebd28fd26dc Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 15:41:06 +0200 Subject: [PATCH 16/22] outputs cleaup --- modules/gcve-private-cloud/outputs.tf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/gcve-private-cloud/outputs.tf b/modules/gcve-private-cloud/outputs.tf index 76267f21..15ca17af 100644 --- a/modules/gcve-private-cloud/outputs.tf +++ b/modules/gcve-private-cloud/outputs.tf @@ -69,7 +69,3 @@ output "vcenter" { description = "Details about a vCenter Server management appliance." value = google_vmwareengine_private_cloud.private-cloud.vcenter } - -output "test" { - value = data.google_compute_network_peering.psa_peering -} From 9452a14ac75f17ace5866faccad10be9e6b43879 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 15:49:20 +0200 Subject: [PATCH 17/22] output cleanup --- modules/gcve-private-cloud/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index a0feefdd..ce0c710a 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -96,6 +96,5 @@ module "gcve-pc" { | [private-cloud](outputs.tf#L42) | The private cloud resource | | | [private_connections_setup](outputs.tf#L47) | Cloud SDK commands for the private connections manual setup. | | | [state](outputs.tf#L63) | Details about the state of the private cloud | | -| [test](outputs.tf#L73) | | | | [vcenter](outputs.tf#L68) | Details about a vCenter Server management appliance. | | From bf26580b9da52f72d1c72e4f50661c7a67398218 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 15:52:56 +0200 Subject: [PATCH 18/22] fixed variables order --- modules/gcve-private-cloud/variables.tf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/gcve-private-cloud/variables.tf b/modules/gcve-private-cloud/variables.tf index d81eb0b4..934b0efe 100644 --- a/modules/gcve-private-cloud/variables.tf +++ b/modules/gcve-private-cloud/variables.tf @@ -13,6 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +variable "cidr" { + description = "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)." + type = string +} variable "description" { description = "Private cloud description." @@ -20,11 +24,6 @@ variable "description" { default = "Terraform-managed." } -variable "cidr" { - description = "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)." - type = string -} - variable "management_cluster_config" { description = "Management cluster configuration." type = object({ From c4ada40275d28d3e35f8129fc8d61b7fea193f52 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 16:52:58 +0200 Subject: [PATCH 19/22] fixed typo --- modules/gcve-private-cloud/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index ce0c710a..b54cc173 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -74,15 +74,15 @@ module "gcve-pc" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [cidr](variables.tf#L23) | 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). | string | ✓ | | -| [name](variables.tf#L43) | Private cloud name. | string | ✓ | | -| [project_id](variables.tf#L85) | Project id. | string | ✓ | | -| [zone](variables.tf#L102) | Private cloud zone. | string | ✓ | | -| [description](variables.tf#L17) | Private cloud description. | string | | "Terraform-managed." | -| [management_cluster_config](variables.tf#L28) | Management cluster configuration. | object({…}) | | {…} | -| [private_connections](variables.tf#L48) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | -| [vmw_network_create](variables.tf#L90) | Create the VMware Engine network. When set to false, it uses a data source to reference an existing VMware Engine network. | bool | | true | -| [vmw_network_description](variables.tf#L96) | VMware Engine network description. | string | | "Terraform-managed." | +| [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). | string | ✓ | | +| [name](variables.tf#L42) | Private cloud name. | string | ✓ | | +| [project_id](variables.tf#L84) | Project id. | string | ✓ | | +| [zone](variables.tf#L101) | Private cloud zone. | string | ✓ | | +| [description](variables.tf#L21) | Private cloud description. | string | | "Terraform-managed." | +| [management_cluster_config](variables.tf#L27) | Management cluster configuration. | object({…}) | | {…} | +| [private_connections](variables.tf#L47) | VMWare private connections configuration. It is used to create the gcloud command printed as output. | map(object({…})) | | {} | +| [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. | bool | | true | +| [vmw_network_description](variables.tf#L95) | VMware Engine network description. | string | | "Terraform-managed." | ## Outputs From 1b93197b87004534c69ae27b0080bf7c942be382 Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 16:56:21 +0200 Subject: [PATCH 20/22] fixed typo --- modules/gcve-private-cloud/outputs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gcve-private-cloud/outputs.tf b/modules/gcve-private-cloud/outputs.tf index 15ca17af..0b7280ce 100644 --- a/modules/gcve-private-cloud/outputs.tf +++ b/modules/gcve-private-cloud/outputs.tf @@ -40,7 +40,7 @@ output "nsx" { } output "private-cloud" { - description = "The private cloud resource" + description = "The private cloud resource." value = google_vmwareengine_private_cloud.private-cloud } @@ -61,7 +61,7 @@ output "private_connections_setup" { } output "state" { - description = "Details about the state of the private cloud" + description = "Details about the state of the private clou." value = google_vmwareengine_private_cloud.private-cloud.state } From 103443dc3036204704a79ce0096e0b046b3b96de Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 16:57:35 +0200 Subject: [PATCH 21/22] fixed typo --- modules/gcve-private-cloud/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index b54cc173..5d5bde31 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -93,8 +93,8 @@ module "gcve-pc" { | [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 | | | [nsx](outputs.tf#L37) | Details about a NSX Manager appliance. | | -| [private-cloud](outputs.tf#L42) | The private cloud resource | | +| [private-cloud](outputs.tf#L42) | The private cloud resource. | | | [private_connections_setup](outputs.tf#L47) | Cloud SDK commands for the private connections manual setup. | | -| [state](outputs.tf#L63) | Details about the state of the private cloud | | +| [state](outputs.tf#L63) | Details about the state of the private clou. | | | [vcenter](outputs.tf#L68) | Details about a vCenter Server management appliance. | | From 126d75a311dd6256dabdb1562bf21ab0f669208b Mon Sep 17 00:00:00 2001 From: eliamaldini Date: Fri, 18 Aug 2023 17:01:12 +0200 Subject: [PATCH 22/22] fixed typo --- modules/gcve-private-cloud/README.md | 8 ++++---- modules/gcve-private-cloud/outputs.tf | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/gcve-private-cloud/README.md b/modules/gcve-private-cloud/README.md index 5d5bde31..901b3079 100644 --- a/modules/gcve-private-cloud/README.md +++ b/modules/gcve-private-cloud/README.md @@ -89,12 +89,12 @@ module "gcve-pc" { | name | description | sensitive | |---|---|:---:| | [hcx](outputs.tf#L17) | Details about a HCX Cloud Manager appliance. | | -| [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 | | +| [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. | | | [nsx](outputs.tf#L37) | Details about a NSX Manager appliance. | | | [private-cloud](outputs.tf#L42) | The private cloud resource. | | | [private_connections_setup](outputs.tf#L47) | Cloud SDK commands for the private connections manual setup. | | -| [state](outputs.tf#L63) | Details about the state of the private clou. | | +| [state](outputs.tf#L63) | Details about the state of the private cloud. | | | [vcenter](outputs.tf#L68) | Details about a vCenter Server management appliance. | | diff --git a/modules/gcve-private-cloud/outputs.tf b/modules/gcve-private-cloud/outputs.tf index 0b7280ce..55578f6d 100644 --- a/modules/gcve-private-cloud/outputs.tf +++ b/modules/gcve-private-cloud/outputs.tf @@ -20,17 +20,17 @@ output "hcx" { } output "id" { - description = "ID of the private cloud" + description = "ID of the private cloud." value = google_vmwareengine_private_cloud.private-cloud.id } output "management_cluster" { - description = "Details of the management cluster of the private cloud" + description = "Details of the management cluster of the private cloud." value = google_vmwareengine_private_cloud.private-cloud.management_cluster } output "network_config" { - description = "Details about the network configuration of the private cloud" + description = "Details about the network configuration of the private cloud." value = google_vmwareengine_private_cloud.private-cloud.network_config } @@ -61,7 +61,7 @@ output "private_connections_setup" { } output "state" { - description = "Details about the state of the private clou." + description = "Details about the state of the private cloud." value = google_vmwareengine_private_cloud.private-cloud.state }