Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for nested security group in security group definition. #859

Closed
Nareshcbit opened this issue Mar 26, 2023 · 3 comments
Closed

Comments

@Nareshcbit
Copy link

Is your feature request related to a problem? Please describe.

In NSX a security group can have other security groups as its members. However, Terraform doesn't support it.
Currently, it allows only VirtualMachine, VirtualNetworkInterface, CloudNativeServiceInstance, or PhysicalServer as members.

Describe the solution you'd like

Allow "SecurityGroup" as member_type for external_id_expression criteria in nsxt_policy_group_definition

resource "nsxt_policy_group" "group1" {
display_name = "tf-group1"
description = "Terraform provisioned Group"
criteria {
external_id_expression {
member_type = "SecurityGroup"
external_ids = ["520ba7b0-d9f8-87b1-6f44-15bbeb7935c7", "52748a9e-d61d-e29b-d54b-07f169ff0ee8-4000"]
}
}

Describe alternatives you've considered

There is no alternative to achieve it through Terraform

Additional context

image

@benzander
Copy link

benzander commented Mar 27, 2023

@Nareshcbit: Static assignment of one Group to another group is possible via terraform. Here how that looks like:

resource "nsxt_policy_group" "group" {
  display_name = "group"
  
  criteria {
    path_expression {
          member_paths = [nsxt_policy_group.nestedGroup.path]
    }
  }
}

The TF Provider is only missing dynamic group in group memberships: #828

@annakhm
Copy link
Collaborator

annakhm commented May 4, 2023

Hello @Nareshcbit, I don't see SecurityGroup is one of the options for member_type in latest NSX spec:

member_type | External ID member type | string | RequiredEnum: VirtualMachine, VirtualNetworkInterface, CloudNativeServiceInstance, PhysicalServer

Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants