Skip to content

Commit

Permalink
Crash Fix: azurerm_linux_virtual_machine_scale_set (hashicorp#13335)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored Sep 13, 2021
1 parent b1d8d1e commit 0875c2b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ func resourceLinuxVirtualMachineScaleSetUpdate(d *pluginsdk.ResourceData, meta i
automaticRaw := d.Get("automatic_os_upgrade_policy").([]interface{})
upgradePolicy.AutomaticOSUpgradePolicy = ExpandVirtualMachineScaleSetAutomaticUpgradePolicy(automaticRaw)

// however if this block has been changed then we need to pull it
// we can guarantee this always has a value since it'll have been expanded and thus is safe to de-ref
automaticOSUpgradeIsEnabled = *upgradePolicy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade
if upgradePolicy.AutomaticOSUpgradePolicy != nil {
automaticOSUpgradeIsEnabled = *upgradePolicy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade
}
}

if d.HasChange("rolling_upgrade_policy") {
Expand Down

0 comments on commit 0875c2b

Please sign in to comment.