https://github.com/global-vmware/vcd_nsxt_dynamic_security_group
This Repository contains the "vcd_nsxt_dynamic_security_group" Terraform Module. You can use this Module to deploy NSX-T Dynamic Security Groups into a VMware Cloud Director (VCD) Environment.
https://github.com/global-vmware/vcd_nsxt_dynamic_security_group
firewall-rules infrastructure-as-code security terraform terraform-module vmware vmware-nsx
Last synced: 8 months ago
JSON representation
This Repository contains the "vcd_nsxt_dynamic_security_group" Terraform Module. You can use this Module to deploy NSX-T Dynamic Security Groups into a VMware Cloud Director (VCD) Environment.
- Host: GitHub
- URL: https://github.com/global-vmware/vcd_nsxt_dynamic_security_group
- Owner: global-vmware
- Created: 2023-05-10T20:52:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-11T18:27:46.000Z (over 2 years ago)
- Last Synced: 2023-12-11T19:25:13.006Z (over 2 years ago)
- Topics: firewall-rules, infrastructure-as-code, security, terraform, terraform-module, vmware, vmware-nsx
- Language: HCL
- Homepage: https://www.rackspace.com/cloud/vmware
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VCD NSX-T Dynamic Security Group Terraform Module
This Terraform module manages NSX-T Dynamic Security Groups in VMware Cloud Director (VCD) environments using the `vmware/vcd` provider.
## Requirements
| Name | Version |
|-----------|---------|
| terraform | ~> 1.2 |
| vcd | ~> 3.8 |
## Resources
| Name | Type |
|----------------------------------------------------------------------|--------------|
| [vcd_vdc_group](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vdc_group) | data source |
| [vcd_nsxt_dynamic_security_group](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/nsxt_dynamic_security_group) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|-----------------|------------------------------------------------------------------|------|---------|----------|
| `vdc_org_name` | The name of the Data Center Group Organization in VCD | string | `"Organization Name Format: --"` | yes |
| `vdc_group_name` | The name of the Data Center Group in VCD | string | `"Data Center Group Name Format: -- "` | yes |
| `dynamic_security_groups` | A map of dynamic security groups to create in NSX-T. Each element of the map should contain a `description` field and a `criteria` list field, where each item in the `criteria` list should be a map containing `type`, `operator`, and `value` fields. | map(object({ description = string, criteria = list(any) })) | N/A | yes |
## Outputs
| Name | Description |
|------------------|------------------------------------------|
| `dynamic_security_groups` | Information about the created NSX-T dynamic security groups. The output is a map where the keys are the names of the dynamic security groups and the values are maps with the following fields: `id`, `name`, `description`, and `member_vms`. |
## Example Usage
This is an example of a `main.tf` file that uses the `"github.com/global-vmware/vcd_nsxt_dynamic_security_group"` Module source to create NSX-T dynamic security groups in a VMware Cloud Director environment:
```terraform
module "vcd_nsxt_dynamic_security_group" {
source = "github.com/global-vmware/vcd_nsxt_dynamic_security_group.git?ref=v1.2.1"
vdc_org_name = ""
vdc_group_name = ""
dynamic_security_groups = {
Web-Servers_Dynamic-SG = {
description = "Web Servers Dynamic Security Group"
criteria = [
{
type = "VM_TAG"
operator = "EQUALS"
value = "web"
}
]
},
Database-Servers_Dynamic-SG = {
description = "Database Servers Dynamic Security Group"
criteria = [
{
type = "VM_TAG"
operator = "EQUALS"
value = "db"
}
]
}
}
}
```
## Authors
This module is maintained by the [Global VMware Cloud Automation Services Team](https://github.com/global-vmware).