-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make eventually-consistent resources poll on create/update #4993
Comments
@spew do you have a good example to repro this or a debug log from when this was causing a diff it shouldn't have? I played around with a couple of the resources you noted but haven't seen one where the update succeed but resulted in the state being set incorrectly. |
https://gist.github.com/kibbles-n-bytes/3d2bb8a76c856354f65ff50cfc72cc44 is a terraform-less repro of the pubsub one |
It's eventually consistent so you won't expect to see it often -- I'd say it happens 1/50 times or so for iam_service_account (which isn't listed). Not sure about frequency of policy. |
Yes, the pubsub example is better. |
I think this would require changing these resources to no longer call into Read after create/update in order to accomplish this. Naturally any subsequent Given that the behavior of state setting in the future is still in question (see #4328) I won't be taking this on right now. |
GoogleCloudPlatform/magic-modules#3155 added the ability to poll post create/update for PubSub and generic utils. We've moved this this near-term goals so we can track adding additional polling in other resources as we find them. |
…icorp#4993) Co-authored-by: upodroid <cy@borg.dev> Co-authored-by: Cameron Thornton <camthornton@google.com> Signed-off-by: Modular Magician <magic-modules@google.com>
… (#9716) Co-authored-by: upodroid <cy@borg.dev> Co-authored-by: Cameron Thornton <camthornton@google.com> Signed-off-by: Modular Magician <magic-modules@google.com> Co-authored-by: upodroid <cy@borg.dev> Co-authored-by: Cameron Thornton <camthornton@google.com>
Description
After a successful CREATE or UPDATE the terraform provider immediately does a GET on the same resource. This creates problems when the resource is eventually consistent as the GET may fetch the old state. Especially so for UPDATEs. Many services which have eventually consistent resources, return a copy of the resource in the response. Rather than GET the resource, the provider could use the response to alleviate some of the issues.
New or Affected Resource(s)
google_iam_policy
google_iam_member
google_pubsub_subscription
References
The text was updated successfully, but these errors were encountered: