diff --git a/cmd/osbuild-worker/main.go b/cmd/osbuild-worker/main.go index 552383147..d5e6c94c5 100644 --- a/cmd/osbuild-worker/main.go +++ b/cmd/osbuild-worker/main.go @@ -128,6 +128,10 @@ func setProtection(protected bool) { } return } + if len(asInstanceOutput.AutoScalingInstances) == 0 { + logrus.Info("No Autoscaling instace is defined") + return + } // make the request to protect (or unprotect) the instance input := &autoscaling.SetInstanceProtectionInput{