Skip to content

Commit

Permalink
Merge pull request #1404 from ksamoray/no_upgrade_mode
Browse files Browse the repository at this point in the history
Handle upgrade components with no upgrade_mode property
  • Loading branch information
ksamoray authored Oct 8, 2024
2 parents 1d71c21 + e75c2a5 commit 9f05d34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nsxt/resource_nsxt_upgrade_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,11 @@ func getPartialUpgradeMap(d *schema.ResourceData, targetVersion string) map[stri
for _, groupI := range d.Get(componentToGroupKey[component]).([]interface{}) {
group := groupI.(map[string]interface{})
enabled := group["enabled"].(bool)
upgradeMode := group["upgrade_mode"].(string)
upgradeMode := ""
um, ok := group["upgrade_mode"]
if ok {
upgradeMode = um.(string)
}
pauseAfterEach := group["pause_after_each_upgrade_unit"].(bool)
if !enabled || pauseAfterEach || upgradeMode == "stage_in_vlcm" {
isPartialUpgradeMap[component] = true
Expand Down

0 comments on commit 9f05d34

Please sign in to comment.