vmware / terraform-provider-vcd

Terraform VMware Cloud Director provider
https://www.terraform.io/docs/providers/vcd/
Mozilla Public License 2.0
151 stars 112 forks source link

"edge_gateway_id" required in resource "vcd_nsxt_security_group" but not needed #1356

Open carmine73 opened 1 day ago

carmine73 commented 1 day ago

Terraform Version

Terraform v1.9.7 on linux_amd64

Affected Resource(s)

Terraform Configuration Files

## imported net security group -> why edge id is needed?
resource "vcd_nsxt_security_group" "net_sec_group" {
  #edge_gateway_id = var.edge.id

  name                   = "sec-group-${vcd_nsxt_network_imported.net}"
  description            = "imported net-sec-group: ${local.net.subnet}"
  member_org_network_ids = [vcd_nsxt_network_imported.net.id]
}

Debug Output

│ Error: Missing required argument
│
│   on mod-l2_nets/fcp-l2-nets.tf line 146, in resource "vcd_nsxt_security_group" "net_sec_group":
│  146: resource "vcd_nsxt_security_group" "net_sec_group" {
│
│ The argument "edge_gateway_id" is required, but no definition was found.
╵

Expected Behavior

I should be able to create a static security group in a vdc group with imported net e with no edge gateway (with UI is possible). owner_id parameter (accepting edge gw id or vcd group id), or vdc_group (as alternative of edge_gateway_id should be present.

Actual Behavior

"edge_gateway_id" is required