Skip to content

Commit

Permalink
fix crash in nil value for auto_upgrade_minor_version_enabled (#27353)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops authored Oct 4, 2024
1 parent 22e2f9a commit 4d5af74
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1432,11 +1432,13 @@ func expandOrchestratedVirtualMachineScaleSetExtensions(input []interface{}) (ex
}
extensionType := extensionRaw["type"].(string)

autoUpgradeMinorVersion, _ := extensionRaw["auto_upgrade_minor_version_enabled"].(bool)

extensionProps := virtualmachinescalesets.VirtualMachineScaleSetExtensionProperties{
Publisher: pointer.To(extensionRaw["publisher"].(string)),
Type: &extensionType,
TypeHandlerVersion: pointer.To(extensionRaw["type_handler_version"].(string)),
AutoUpgradeMinorVersion: pointer.To(extensionRaw["auto_upgrade_minor_version_enabled"].(bool)),
AutoUpgradeMinorVersion: pointer.To(autoUpgradeMinorVersion),
ProvisionAfterExtensions: utils.ExpandStringSlice(extensionRaw["extensions_to_provision_after_vm_creation"].([]interface{})),
}

Expand Down

0 comments on commit 4d5af74

Please sign in to comment.