Skip to content

Commit

Permalink
Fix missing vapp properties
Browse files Browse the repository at this point in the history
Due to the way maps behave in goland we ended up removing data from the
original map holding the vapp properties. The consequence was that if
expandVAppConfig was called more than once, we'd end up effectively
emptying the vapp properties map.
  • Loading branch information
Kyriakos Oikonomakos authored and koikonom committed Jan 29, 2021
1 parent b2f6e3e commit 78eb8b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vsphere/virtual_machine_config_structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ func expandVAppConfig(d *schema.ResourceData, client *govmomi.Client) (*types.Vm
if newVApps != nil && len(newVApps) > 0 && newVApps[0] != nil {
newVApp := newVApps[0].(map[string]interface{})
if props, ok := newVApp["properties"].(map[string]interface{}); ok {
newMap = props
for k, v := range props {
newMap[k] = v
}
}
}

Expand Down

0 comments on commit 78eb8b2

Please # to comment.