Skip to content

Commit

Permalink
fix nil pointer for VMSS boot diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
mweibel committed Feb 27, 2023
1 parent de34751 commit 3740197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azure/services/scalesets/scalesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (s *Service) validateSpec(ctx context.Context) error {
}

// Validate DiagnosticProfile spec
if spec.DiagnosticsProfile.Boot != nil {
if spec.DiagnosticsProfile != nil && spec.DiagnosticsProfile.Boot != nil {
if spec.DiagnosticsProfile.Boot.StorageAccountType == infrav1.UserManagedDiagnosticsStorage {
if spec.DiagnosticsProfile.Boot.UserManaged == nil {
return azure.WithTerminalError(fmt.Errorf("userManaged must be specified when storageAccountType is '%s'", infrav1.UserManagedDiagnosticsStorage))
Expand Down

0 comments on commit 3740197

Please sign in to comment.