Describe the bug
For nsxt_vpc_subnet resource - dhcp_config seems impossible to configure.
According to documentation the dhcp_config allows:
dhcp_config - (Optional) VPC Subnet DHCP config
dhcp_relay_config_path - (Optional) Policy path of DHCP-relay-config. If configured then all the subnets will be configured with the DHCP relay server. If not specified, then the local DHCP server will be configured for all connected subnets.
dns_client_config - (Optional)
dns_server_ips - (Optional) IPs of the DNS servers which need to be configured on the workload VMs
static_pool_config - (Optional)
ipv4_pool_size - (Optional) Number of IPs to be reserved in static ip pool. Maximum allowed value is 'subnet size - 4'. If dhcp is enabled then by default static ipv4 pool size will be zero and all available IPs will be reserved in local dhcp pool. If dhcp is deactivated then by default all IPs will be reserved in static ip pool.
enable_dhcp - (Optional) If activated, the DHCP server will be configured based on IP address type. If deactivated then neither DHCP server nor relay shall be configured.
However only dhcp_relay_config_path, enable_dhcp, and path seem available
Reproduction steps
configure the provider and pass the variables
create a resource
resource "nsxt_vpc_subnet" "test-vpcsubnet" {
display_name = "Subnet test"
description = "This is test VpcSubnet"
nsx_id = "test-VpcSubnet-abc"
ipv4_subnet_size = 256
access_mode = "Public"
dhcp_config {
enable_dhcp = "true"
ipv4_pool_size = "10" <----- errors out
}
}
you get an error if you all ip4_pool_size for example.
│ Error: Unsupported argument
│
│ on main.tf line 8, in resource "nsxt_vpc_subnet" "test-vpcsubnet":
│ 8: dns_server_ips = ["9.9.9.9"]
│
│ An argument named "dns_server_ips" is not expected here.
╵
╷
│ Error: Unsupported argument
│
│ on main.tf line 9, in resource "nsxt_vpc_subnet" "test-vpcsubnet":
│ 9: ipv4_pool_size = "10"
│
│ An argument named "ipv4_pool_size" is not expected here.
Expected behavior
I would expect that these parameters are configurable, specify dns and if needed reserve some IPs from the dhcp pool for static allocations.
Additional context
No response