|
1 |
| -# vcd_nsxt_firewall |
| 1 | +# VCD NSX-T Edge Gateway Firewall Rules Terraform Module |
| 2 | + |
| 3 | +This Terraform module deploys NSX-T Edge Gateway Firewall Rules into an existing VMware Cloud Director (VCD) environment. It enables the provisioning of new Edge Gateway Firewall Rules into [Rackspace Technology SDDC Flex](https://www.rackspace.com/cloud/private/software-defined-data-center-flex) VCD Data Center Regions. |
| 4 | + |
| 5 | +## Requirements |
| 6 | + |
| 7 | +| Name | Version | |
| 8 | +|------|---------| |
| 9 | +| terraform | ~> 1.2 | |
| 10 | +| vcd | ~> 3.8 | |
| 11 | + |
| 12 | +## Resources |
| 13 | + |
| 14 | +| Name | Type | |
| 15 | +|----------------------------------------------------------------------|--------------| |
| 16 | +| [vcd_nsxt_edgegateway](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/nsxt_edgegateway) | Data Source | |
| 17 | +| [vcd_vdc_group](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vdc_group)| Data Source | |
| 18 | +| [vcd_nsxt_security_group](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/nsxt_security_group) | Data Source | |
| 19 | +| [vcd_nsxt_firewall](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/nsxt_firewall) | Resource | |
| 20 | + |
| 21 | +## Inputs |
| 22 | + |
| 23 | +| Name | Description | Type | Default | Required | |
| 24 | +|------|-------------|------|---------|----------| |
| 25 | +| vdc_org_name | The name of the Data Center Group Organization in VCD | string | - | yes | |
| 26 | +| vdc_group_name | The name of the Data Center Group in VCD | string | - | yes | |
| 27 | +| vdc_edge_name | Name of the Data Center Group Edge Gateway | string | - | yes | |
| 28 | +| app_port_profiles | Map of app port profiles with their corresponding scopes | map(string) | {} | no | |
| 29 | +| ip_set_names | List of IP set names | list(string) | [] | yes | |
| 30 | +| dynamic_security_group_names | List of dynamic security group names | list(string) | [] | no | |
| 31 | +| security_group_names | List of security group names | list(string) | [] | no | |
| 32 | +| rules | List of rules to apply | list(object({ name = string, direction = string, ip_protocol = string, action = string, enabled = optional(bool), logging = optional(bool), source_ids = optional(list(string)), destination_ids = optional(list(string)), app_port_profile_ids = optional(list(string)) })) | [] | yes | |
| 33 | + |
| 34 | +## Outputs |
| 35 | + |
| 36 | +| Name | Description | |
| 37 | +|------|-------------| |
| 38 | +| firewall_id | The ID of the firewall | |
| 39 | +| firewall_rule_names | The names of the firewall rules | |
| 40 | + |
| 41 | +## Example Usage |
| 42 | + |
| 43 | +```terraform |
| 44 | +module "vcd_nsxt_firewall" { |
| 45 | + source = "github.com/global-vmware/vcd_nsxt_firewall.git?ref=v1.1.0" |
| 46 | +
|
| 47 | + vdc_org_name = "<VDC-ORG-NAME>" |
| 48 | + vdc_group_name = "<VDC-GRP-NAME>" |
| 49 | + vdc_edge_name = "<VDC-EDGE-NAME>" |
| 50 | +
|
| 51 | + app_port_profiles = { |
| 52 | + "HTTPS" = "SYSTEM", |
| 53 | + } |
| 54 | +
|
| 55 | + ip_set_names = [ |
| 56 | + "US1-Segment-01-Network_172.16.0.0/24_IP-Set", |
| 57 | + "US1-Segment-02-Network_172.16.1.0/24_IP-Set", |
| 58 | + "US1-Segment-03-Network_172.16.2.0/24_IP-Set", |
| 59 | + "US1-Segment-04-Network_172.16.3.0/24_IP-Set", |
| 60 | + "US1-Segment-05-Network_172.16.4.0/24_IP-Set", |
| 61 | + "Prod-App-NSXT-ALB-VIP" |
| 62 | + ] |
| 63 | +
|
| 64 | + rules = [ |
| 65 | + { |
| 66 | + name = "Allow_HTTPS-->Prod-App-NSXT-ALB-VIP" |
| 67 | + direction = "IN_OUT" |
| 68 | + ip_protocol = "IPV4" |
| 69 | + action = "ALLOW" |
| 70 | + app_port_profile_ids = ["HTTPS"] |
| 71 | + destination_ids = ["Prod-App-NSXT-ALB-VIP"] |
| 72 | + }, |
| 73 | + { |
| 74 | + name = "Allow_Outbound-Internet" |
| 75 | + direction = "IN_OUT" |
| 76 | + ip_protocol = "IPV4" |
| 77 | + action = "ALLOW" |
| 78 | + source_ids = [ |
| 79 | + "US1-Segment-01-Network_172.16.0.0/24_IP-Set", |
| 80 | + "US1-Segment-02-Network_172.16.1.0/24_IP-Set", |
| 81 | + "US1-Segment-03-Network_172.16.2.0/24_IP-Set", |
| 82 | + "US1-Segment-04-Network_172.16.3.0/24_IP-Set", |
| 83 | + "US1-Segment-05-Network_172.16.4.0/24_IP-Set" |
| 84 | + ] |
| 85 | + } |
| 86 | + ] |
| 87 | +} |
| 88 | +``` |
| 89 | + |
| 90 | +## Authors |
| 91 | + |
| 92 | +This module is maintained by the [Global VMware Cloud Automation Services Team](https://github.com/global-vmware). |
0 commit comments