worker: provide the region for the ASG

Before, the autoscaling group discovery is failing with error:
Error getting the Autoscaling instances: MissingRegion MissingRegion:
could not find region configuration
This commit is contained in:
Thomas Lavocat 2022-05-11 15:56:47 +02:00 committed by Sanne Raymaekers
parent 5a4488c829
commit c00aae0a4a

View file

@ -105,7 +105,7 @@ func setProtection(protected bool) {
return
}
svc := autoscaling.New(awsSession)
svc := autoscaling.New(awsSession, aws.NewConfig().WithRegion(identity.Region))
// get the autoscaling group info for the auto scaling group name
asInstanceInput := &autoscaling.DescribeAutoScalingInstancesInput{