Skip to content

Commit

Permalink
Merge pull request #1178 from ksamoray/subcfg_ip_assignment_nil
Browse files Browse the repository at this point in the history
Switch sub-config with no IP assignment bug
  • Loading branch information
ksamoray authored Apr 9, 2024
2 parents f892ec7 + 19bfa6a commit d8f4f3c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nsxt/resource_nsxt_edge_transport_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1435,9 +1435,11 @@ func setHostSwitchSpecInSchema(d *schema.ResourceData, spec *data.StructValue, n
if len(profiles) > 0 {
hsCfgOpt["host_switch_profile"] = profiles
}
hsCfgOpt["ip_assignment"], err = setIPAssignmentInSchema(tnpsc.HostSwitchConfigOption.IpAssignmentSpec)
if err != nil {
return err
if tnpsc.HostSwitchConfigOption.IpAssignmentSpec != nil {
hsCfgOpt["ip_assignment"], err = setIPAssignmentInSchema(tnpsc.HostSwitchConfigOption.IpAssignmentSpec)
if err != nil {
return err
}
}
hsCfgOpt["uplink"] = setUplinksFromSchema(tnpsc.HostSwitchConfigOption.Uplinks)
e["host_switch_config_option"] = []interface{}{hsCfgOpt}
Expand Down

0 comments on commit d8f4f3c

Please sign in to comment.