-
Notifications
You must be signed in to change notification settings - Fork 178
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
Hitting timing issue when trying to integrate with aws
provider's aws_iam_access_key
resource
#127
Comments
Thank you so much! Let me check it out to resolve that, so I will try making the change in ASAP. |
Thanks @PacoDw ! I think just discussing whether this sort of "work-around" should be added to the Atlas provider would be highly appreciated. |
My .02 is that trying to bring this into the Atlas provider as a work around might be problematic. Users who already have the access key shouldn't run into this. It seems to happen when one tries to create the key right before setting up encryption at rest. If we had an easy way to check if hte key really exists or not we could od that but I think that could be challenging. The other option might be a standard x amount of sleep before trying to enable encryption at rest in case the key is not there yet but we'd need to figure out a good time amount and no idea what that should be. @mattt416 I think this could be, potentially a good thing to note in our doc. Something like "ensure you give sufficient timing between the creation of an encryption key and applying it to ensure the key exists". Thoughts? |
@themantissa This is the first time I've come across this issue, so it might be worth leaving this issue open for a while so we can collect more data from other users who are seeing similar issues. |
I agree that this really isn't a mongodbatlas provider issue. I've encountered this issue as well and my workaround was a little Go program that waits until the IAM user is successfully able to do a describe-keys using the IAM user and access keys created by the module. I have that program called from a provider block on the aws_iam_access_key resource. I'm finding that it's only a 10-20 second wait until after the access keys are created that they become usable. |
Verified simply issue from AWS side so going to document the workaround and then close this issue. Until documented we'll leave this open for others to discover workaround options. |
Having the same issue. Any solutions to this? |
@themantissa Since we have moved to the Role based authentication for Encryption at Rest, this has solved the problem and I do not face it anymore. |
Hi Team,
I've got the following Terraform config:
When applied, I'm hitting the following error:
If I immediately re-apply, the resource is created as expected, which implies the
access_key_id
andsecret_access_key
being passed to/encryptionAtRest
are correct.Further, if I add a sleep to the "mongodb_atlas" resource, the resource is created the first time without issue:
This looks like a timing issue in the
aws
provider. Would there be value in handling this in the MongoDB Atlas provider, or should a work-around be implemented in the config as was demonstrated above?Thanks,
Matt
The text was updated successfully, but these errors were encountered: