vmware / terraform-provider-nsxt

Terraform VMware NSX-T provider
https://www.terraform.io/docs/providers/nsxt/
Other
128 stars 83 forks source link

nsxt_policy_group member_type policy evolve #1266

Open llebotlan opened 1 month ago

llebotlan commented 1 month ago

Describe the bug

Today, I have Version 4.1.1.0.0.22224312 NSXT which one can filter nsxt_policy_group member_type SegmentPort and Segment. But I tried from terraform : criteria { condition { member_type = "SegmentPort" <==== key = "Tag" operator = "EQUALS" value = "vsphere_port|${var.ports[0]}" } condition { member_type = "Segment" <==== key = "Tag" operator = "EQUALS" value = "*{var.nsx_tag}|${var.net}" } } I can do this nsxt

Reproduction steps

  1. write tf file with nsxt_policy_group defined earlier
  2. launch terraform
  3. observe Error : Error: Nested conditions must all use the same member_type, but found 'Segment' with 'SegmentPort' │ │ with nsxt_policy_group.networkTag["monitoring_support"], │ on 3-nsx.tf line 366, in resource "nsxt_policy_group" "networkTag": │ 366: resource "nsxt_policy_group" "networkTag" { ...

Expected behavior

Maybe let NSX API reply for you despite of avoiding unsupported configuration

Additional context

No response

annakhm commented 1 month ago

Thanks @llebotlan, indeed we should remove this validation as NSX allows combinations now

salv-orlando commented 4 weeks ago

Adding this issue to the 3.7.0 milestone after discussing it with @annakhm

salv-orlando commented 3 days ago

Moving this issue to 3.8.0 due to release timeline constraints.