VMware Networking Community
jamesclarke1
Contributor
Contributor
Jump to solution

script for security groups

Hi all,

 

wondering if anyone has a script for automating the creation of groups? Creating the multiple groups on multiple managers is cumbersome, what we do is create a group under inventory, type generic, and we set criteria eg:

group name: securitygroup1

type: generic

criterion: virtual machine tag equals securitytag1 AND virtual machine tag equals securitytag2

 

ETC.. (there could be 1 -6 matching tags needed) anyone have a script they could share that is close to the above I could use?

 

thanks in advance 

 

 

Reply
0 Kudos
1 Solution

Accepted Solutions
Sreec
VMware Employee
VMware Employee
Jump to solution

Yes it is possible and i have automated it with similar approach . Please check  - https://registry.terraform.io/providers/vmware/nsxt/latest/docs/resources/policy_group 

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 6x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered

View solution in original post

Reply
0 Kudos
4 Replies
Sreec
VMware Employee
VMware Employee
Jump to solution

You can try https://registry.terraform.io/providers/vmware/nsxt/latest/docs  , there is a section under Firewall for multiple use cases. 

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 6x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
Reply
0 Kudos
jamesclarke1
Contributor
Contributor
Jump to solution

Thanks, one part om struggling with is all the examples are based on a single tag match I need multiple with the AND operator any ideas on that part?

Reply
0 Kudos
Sreec
VMware Employee
VMware Employee
Jump to solution

Yes it is possible and i have automated it with similar approach . Please check  - https://registry.terraform.io/providers/vmware/nsxt/latest/docs/resources/policy_group 

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 6x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
Reply
0 Kudos
jamesclarke1
Contributor
Contributor
Jump to solution

Looks great thanks

Reply
0 Kudos