{"id":26716823,"url":"https://github.com/global-vmware/vcd_nsxt_network_dhcp","last_synced_at":"2026-01-08T01:15:54.967Z","repository":{"id":160536441,"uuid":"635410461","full_name":"global-vmware/vcd_nsxt_network_dhcp","owner":"global-vmware","description":"This Repository contains the \"vcd_nsxt_network_dhcp\" Terraform Module. You can use this Module to deploy DHCP Pools for Routed Data Center Group Networks into a VMware Cloud Director (VCD) Environment.","archived":false,"fork":false,"pushed_at":"2023-12-12T19:10:07.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-13T19:18:12.836Z","etag":null,"topics":["infrastructure-as-code","networking","terraform","terraform-module","vmware","vmware-nsx"],"latest_commit_sha":null,"homepage":"https://www.rackspace.com/cloud/vmware","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/global-vmware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-02T16:26:23.000Z","updated_at":"2023-12-13T19:18:12.836Z","dependencies_parsed_at":"2023-12-12T18:57:36.603Z","dependency_job_id":null,"html_url":"https://github.com/global-vmware/vcd_nsxt_network_dhcp","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_nsxt_network_dhcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_nsxt_network_dhcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_nsxt_network_dhcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_nsxt_network_dhcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/global-vmware","download_url":"https://codeload.github.com/global-vmware/vcd_nsxt_network_dhcp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245874766,"owners_count":20686830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infrastructure-as-code","networking","terraform","terraform-module","vmware","vmware-nsx"],"created_at":"2025-03-27T15:47:51.785Z","updated_at":"2026-01-08T01:15:54.962Z","avatar_url":"https://github.com/global-vmware.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VCD NSX-T Routed Network DHCP Terraform Module\n\nThis Terraform module deploys NSX-T Routed Network DHCP Pools into an existing VMware Cloud Director (VCD) environment. This module can be used to provision new NSX-T DHCP Pools into [Rackspace Technology SDDC Flex](https://www.rackspace.com/cloud/private/software-defined-data-center-flex) VCD Data Center Regions.\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 1.5.7 |\n| vcd | \u003e= 3.8.2 |\n\n## Resources\n\n| Name                                                                 | Type         |\n|----------------------------------------------------------------------|--------------|\n| [vcd_nsxt_edgegateway](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/nsxt_edgegateway) | Data Source |\n| [vcd_vdc_group](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vdc_group) | Data Source |\n| [vcd_network_routed_v2](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/network_routed_v2) | Data Source |\n| [vcd_nsxt_network_dhcp](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/nsxt_network_dhcp) | Resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|----------|\n| vdc_org_name | The name of the Data Center Group Organization in VCD | string | - | yes |\n| vdc_edge_name | Name of the Data Center Group Edge Gateway | string | - | yes |\n| vdc_group_name | The name of the Data Center Group in VCD | string | - | yes |\n| segments | Map of network segments to configure DHCP on. Attributes like `dhcp_mode` (default: \"EDGE\"), `lease_time` (default: 30 days), and `dns_servers` (default: [\"192.168.255.228\"]) have defaults. | map(object) | {} | yes |\n\n## Validation Rules\n\nThe module includes strict validation based on the `dhcp_mode`:\n- **NETWORK**: Requires `listener_ip_address` and at least one pool in `pool_ranges`.\n- **EDGE**: Requires at least one pool in `pool_ranges`. MUST NOT have `listener_ip_address`.\n- **RELAY**: MUST NOT have `listener_ip_address` or `pool_ranges`.\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| dhcp_pools | Comprehensive map of deployed DHCP configurations, reading directly from resource attributes. |\n\n## Example Usage\n\n### Standard Deployment (EDGE Mode)\n```terraform\nmodule \"vcd_nsxt_network_dhcp\" {\n  source = \"github.com/global-vmware/vcd_nsxt_network_dhcp.git?ref=v2.1.0\"\n\n  vdc_org_name   = \"\u003cVDC-ORG-NAME\u003e\"\n  vdc_group_name = \"\u003cVDC-GRP-NAME\u003e\"\n  vdc_edge_name  = \"\u003cVDC-EDGE-NAME\u003e\"\n\n  segments = {\n    \"Web-Network\" = {\n      dhcp_mode   = \"EDGE\"\n      dns_servers = [\"192.168.255.228\"]\n      pool_ranges = [{\n        start_address = \"10.0.0.100\"\n        end_address   = \"10.0.0.200\"\n      }]\n    }\n  }\n}\n```\n\n### Network Specific Deployment (NETWORK Mode)\n```terraform\nmodule \"vcd_nsxt_network_dhcp\" {\n  source = \"github.com/global-vmware/vcd_nsxt_network_dhcp.git?ref=v2.1.0\"\n  \n  vdc_org_name   = \"\u003cVDC-ORG-NAME\u003e\"\n  vdc_group_name = \"\u003cVDC-GRP-NAME\u003e\"\n  vdc_edge_name  = \"\u003cVDC-EDGE-NAME\u003e\"\n\n  segments = {\n    \"Web-Network\" = {\n      dhcp_mode           = \"NETWORK\"\n      listener_ip_address = \"10.1.0.10\"\n      dns_servers         = [\"10.1.0.10\", \"10.1.0.11\"]\n      lease_time          = 604800\n      pool_ranges = [{\n        start_address = \"10.1.0.100\"\n        end_address   = \"10.1.0.200\"\n      }]\n    }\n  }\n}\n```\n\n### Relay Deployment (RELAY Mode)\n```terraform\nmodule \"vcd_nsxt_network_dhcp\" {\n  source = \"github.com/global-vmware/vcd_nsxt_network_dhcp.git?ref=v2.1.0\"\n  # ... other variables ...\n\n  vdc_org_name   = \"\u003cVDC-ORG-NAME\u003e\"\n  vdc_group_name = \"\u003cVDC-GRP-NAME\u003e\"\n  vdc_edge_name  = \"\u003cVDC-EDGE-NAME\u003e\"\n\n  segments = {\n    \"Web-Network\" = {\n      dhcp_mode = \"RELAY\"\n      # listener_ip_address and pool_ranges MUST be omitted\n    }\n  }\n}\n```\n\n## Authors\n\nThis module is maintained by the [Global VMware Cloud Automation Services Team](https://github.com/global-vmware).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobal-vmware%2Fvcd_nsxt_network_dhcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobal-vmware%2Fvcd_nsxt_network_dhcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobal-vmware%2Fvcd_nsxt_network_dhcp/lists"}