Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
*string needs nil guard (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored and tariq1890 committed Nov 16, 2018
1 parent dd06fd5 commit 54664d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/operations/deletevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func CleanDeleteVirtualMachine(az armhelpers.AKSEngineClient, logger *log.Entry,
}
}

if vm.Identity != nil {
if vm.Identity != nil && vm.Identity.PrincipalID != nil {
// Role assignments are not deleted if the VM is destroyed, so we must cleanup ourselves!
// The role assignments should only be relevant if managed identities are used,
// but always cleaning them up is easier than adding rule based logic here and there.
Expand Down

0 comments on commit 54664d8

Please sign in to comment.