-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add workaround for IAM delays when creating and trying to use s2s auth policies #4478
Comments
@vivekj3 I am tagging you since you created a fix for a very similar issue (same root cause actually) in #4556 For that issue, the flow was:
The fix you added in 4556 will now retry the GET and hopefully pass on retry when data is replicated. I am very thankful for that fix, but here is a second use case that needs to be solved:
My guess is that again the auth policy has not been replicated to all backend cloudant instances, and so we see this misleading error. If I wait a few seconds and re-try the terraform apply, it always works. As a workaround in our terraform code, we have actually added a 30 second sleep after any time we create an auth policy before attempting to use it. However we have many many modules and instead of adding a workaround to all modules, I think maybe something can be done in the provider code? Perhaps also add a sleep any time an auth policy is created? Thoughts? |
@ocofaigh Does this issue still exist? |
@IBM-diksha yes we still intermittently see this issue as per #4478 (comment) |
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#592) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#494) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#54) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#53) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#45) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#65) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) ([#160](https://github.ibm.com/GoldenEye/icd-datastax-module/issues/160)) (#191) Co-authored-by: Conall Ó Cofaigh <[email protected]>
…provider-ibm#4478) (#72) Co-authored-by: Khuzaima-Shakeel <[email protected]> Co-authored-by: Conall Ó Cofaigh <[email protected]>
… for this provider [issue](IBM-Cloud/terraform-provider-ibm#4478). NOTE: Upgrades from earlier to version to this version may show a time_sleep.wait_for_authorization_policy being deleted if they are skipping authorisation policy creation. This is expected, since there is no need to delay if the authorisation policy already exists. (#518)
ibm_iam_authorization_policy
here to create a service to a service auth policy between KMS <-> COSibm_cos_bucket
, it fails with the following error:Is it possible to add some workaround to this delay in the provider code. Perhaps a retry, or some extra validation when creating an auth policy that indeed the policy is ready for use?
My suspicion is that this is an IAM database replication issue where the auth policy exists on one database node, but is not fully replicated to the other yet, as we have seen something similar occur for other use cases too.
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: