Skip to content

Commit d2a5dde

Browse files
committed
Add Computed to ip_assignment and cpu_config to fix diff issue
Sub-config objects were not set into schema in read operation, causing NSX-populated defaults for the enhanced-networking-stack cpu_config block and for ip_assignment to perpetually plan back to empty on every apply. Mark both TypeList blocks Computed so Terraform accepts the server-populated values when the user has not explicitly set them. Note: this drops the "Required: true" caller (nsxt_edge_transport_node_rtep) since Required+Computed is an invalid schema combination; that specific line was already flipped to Optional (via getIPAssignmentSchemaForRTEP) by the separately-landed edge_transport_node_rtep bug-fix PR, so no change is needed here for it.
1 parent 6b6687d commit d2a5dde

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

nsxt/resource_nsxt_edge_transport_node.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ func getStandardHostSwitchSchema(nodeType string) *schema.Schema {
492492
Type: schema.TypeList,
493493
Description: "Enhanced Networking Stack enabled HostSwitch CPU configuration",
494494
Optional: true,
495+
Computed: true,
495496
Elem: &schema.Resource{
496497
Schema: map[string]*schema.Schema{
497498
"num_lcores": {
@@ -689,6 +690,7 @@ func getIPAssignmentSchema(required bool) *schema.Schema {
689690
MaxItems: 1,
690691
Required: required,
691692
Optional: !required,
693+
Computed: true,
692694
Elem: &schema.Resource{
693695
Schema: map[string]*schema.Schema{
694696
"assigned_by_dhcp": {

0 commit comments

Comments
 (0)