Skip to content

Commit

Permalink
Fix Panic Error #10413 - Fix segmentation fault - virtual machine sca…
Browse files Browse the repository at this point in the history
…le set resource (#12962)

Co-authored-by: Ryan McAfee <[email protected]>
  • Loading branch information
ryanmcafee and ryanmcafee authored Aug 12, 2021
1 parent f9068e9 commit 6e0adaa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/services/compute/virtual_machine_scale_set_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,14 @@ func flattenAzureRmVirtualMachineScaleSetOsProfileSecrets(secrets *[]compute.Vau
}

func flattenAzureRmVirtualMachineScaleSetBootDiagnostics(bootDiagnostic *compute.BootDiagnostics) []interface{} {
b := map[string]interface{}{
"enabled": *bootDiagnostic.Enabled,
"storage_uri": *bootDiagnostic.StorageURI,
b := make(map[string]interface{})

if bootDiagnostic.Enabled != nil {
b["enabled"] = *bootDiagnostic.Enabled
}

if bootDiagnostic.StorageURI != nil {
b["storage_uri"] = *bootDiagnostic.StorageURI
}

return []interface{}{b}
Expand Down

0 comments on commit 6e0adaa

Please sign in to comment.