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

Commit

Permalink
*string PrincipalID needs to be nil-guarded (#4258)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Nov 16, 2018
1 parent 1b07ace commit 0449af5
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 @@ -90,7 +90,7 @@ func CleanDeleteVirtualMachine(az armhelpers.ACSEngineClient, 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 0449af5

Please sign in to comment.