terragrunt
terragrunt copied to clipboard
aws s3 remote_state OperationAborted: A conflicting conditional operation is currently in progress against this resource.
Good day everyone.
We have just recently updated Terragrunt from version 0.31.4 to 0.38.4 This introduced new feature that automatically updates s3 remote state. That is fine - except that it fails from time to time. Sometime on account creation or account updating (as it tries to enable versioning on state) with the following :
time=2022-07-27T12:30:38Z level=error msg=7 errors occurred:
* OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
It is enough to re-run and it is back to normal.
I kind of understand why this is happening - due to aws limitation on s3 bucket, but somehow i thought this had to be handled internally...
The command we run is : terragrunt run-all plan --terragrunt-non-interactive -out planfile.tfplan
Over ten modules on single run.
Somehow strange that no one else reported the same, so thinking maybe I have missed something or there is somewhere documentation around the same ?
Thanks for an update.
Hi,
maybe -terragrunt-log-level debug
will highlight more details on what is happening, also can be defined retryable_errors
until it is handled in terragrunt
https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#retryable_errors
Good day,
Have enabled debug mode on terragrunt.
Once a new account is being created (multi account organisation) - it does not contain any bucket to store modules state.
During the initial plan phase on a new account - TerraGrunt performs modifications on bucket (creates it and enables versioning).
there are over 15 modules being applied at once.
But it fails on initial run - on the second run it would succeed - as would identify bucket in correct state.
With that retryable_errors
- we could get it up and running probably, but do not think it is a solution. Probably would be great if Terragrunt
could initialise and configuration s3 bucket for state, only once during the run, but not for each of the modules - as it is doing it as of now. hence this and leads to (four similar errorsm only request id and host id are different ones )
time=2022-08-08T09:24:25Z level=error msg=4 errors occurred:
* OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
status code: 409, request id: B4H73V3DRMRG1FQX, host id: T3pjrWDblsBhv49HZhqAJ8zGMraerWtf27HLCs3snXc6aHaHOLihzf5d3XOlU9JJSmQrijvgO1c=
pleae let me know if you require some additional information.