hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.34k stars 1.74k forks source link

Missing spoke.group argument in google_network_connectivity_spoke resource #18297

Open sagitur101 opened 5 months ago

sagitur101 commented 5 months ago

Community Note

Description

When hub policy mode configure to 'PRESET' and the preset topology is 'STAR', the argument spoke.group that should define the spoke group (center|edge) is missing in the documentation.

I got this error: - field spoke.group must be defined when hub.policy_mode = PRESET and hub.preset_topology = STAR: invalid argument

New or Affected Resource(s)

google_network_connectivity_spoke, google_network_connectivity_hub

Potential Terraform Configuration

resource "google_network_connectivity_spoke" "office-0-spokes" { for_each = var.vpc_names

name = "${each.key}-spoke" location = "global" hub = var.hub_uri linked_vpc_network { uri = google_compute_network.office-0-vpcs[each.key].id } group = "CENTER" || "EDGE"

}

References

No response

b/344606019

SarahFrench commented 5 months ago

Note from triage: here's the field in the API, and this resource is made via the DCL

Filipo24 commented 4 months ago

Not sure if it should be treated as a separate issue, but as it is related to the same feature I suggest the resource google_network_connectivity_hub is also updated to support a new attribute for preset_topology as for the VPC spoke to be part of the group the NCC hub need to set the Preset topology first to support STAR instead of MESH topology -> presetTopology