Does anyone know how to mitigate throttling when using terraform 0.11.7
terraform-0.11.7 plan -out proposed.plan -no-color
Error: Error refreshing state: 1 error(s) occurred:
* module.ecs_alb.aws_alb_target_group.backend_internal_alb_target_group: 1 error(s) occurred:
* module.ecs_alb.aws_alb_target_group.backend_internal_alb_target_group[5]:
aws_alb_target_group.backend_internal_alb_target_group.5:
Error retrieving Target Group Attributes:
Throttling: Rate exceeded
status code: 400, request id: ...
make: *** [plan] Error 1
I run these from jenkins, so I loop with a try catch like so (we run terraform via make and the tf commands would be plan, apply, output. I'm waiting 10s between retries. I'll probably bump that up to something longer.
while (retry < retries) {
try {
makeError = null
sh "make ${targets.join(' ')}"
break
} catch (Exception ex) {
fileOperations([fileCopyOperation(excludes: '', flattenFiles: false, includes: '**log',
renameFiles: false, sourceCaptureExpression: '',
targetLocation: outputDir, targetNameExpression: '')])
makeError = ex
errorHandling.addResult('runMake', "path: ${path}, targets: ${targets}, retry: ${retry} of ${retries} failed with ${makeError}. retrying")
sleep time: waitSecs, unit: 'SECONDS'
} finally {
retry++
}
}
if (makeError) {
throw new Exception("Max retries reached (${retries})", makeError)
}
-parallelism
setting? - Mark B