Merge pull request #10192 from hashicorp/fix_azure_crash

fix crash
This commit is contained in:
Megan Marsh 2020-10-29 14:58:01 -07:00 committed by GitHub
commit 887a791f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -61,7 +61,11 @@ func (s *StepDeleteAdditionalDisk) deleteManagedDisk(ctx context.Context, resour
func (s *StepDeleteAdditionalDisk) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
s.say("Deleting the temporary Additional disk ...")
var dataDisks = state.Get(constants.ArmAdditionalDiskVhds).([]string)
var dataDisks []string
if disks := state.Get(constants.ArmAdditionalDiskVhds); disks != nil {
dataDisks = disks.([]string)
}
var isManagedDisk = state.Get(constants.ArmIsManagedImage).(bool)
var isExistingResourceGroup = state.Get(constants.ArmIsExistingResourceGroup).(bool)
var resourceGroupName = state.Get(constants.ArmResourceGroupName).(string)