Skip to content
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

Occasional timeout when applying the googleworkspace_group_member resource #475

Open
PatrickDale opened this issue Apr 2, 2024 · 1 comment

Comments

@PatrickDale
Copy link

Terraform Version

v1.7.5

Affected Resource(s)

  • googleworkspace_group_member

Terraform Configuration Files

resource "googleworkspace_group_member" "member" {
  group_id = "the-group-id"
  email    = "the-member-email"

  role              = "MEMBER"
  delivery_settings = "NONE"
  type              = "USER"
}

Expected Behavior

We would have expected the member to be added to the group.

Actual Behavior

Most of the time the member is added to the group, but sometimes we get the error message:

Error: timed out while waiting for group_member to be inserted

Even though we get this timeout error, the member is still added to the group but the googleworkspace_group_member.member is not updated in the Terraform state. To resolve this we have to manually import googleworkspace_group_member.member into the Terraform state.

Steps to Reproduce

Apply the Terraform configuration above with different members in the same group, and occasionally you'll see the timeout error pasted above.

Important Factoids

We are adding Google Service Agents to the Google group, but I don't think this is the core issue since we only see this error occasionally.

References

This is similar in behavior to: #387.

@SamuZad
Copy link

SamuZad commented May 11, 2024

This is an issue relating to the google APIs eventual consistency, and how the provider handles the checks for said eventual consistency

I significantly improved this in my fork: https://registry.terraform.io/providers/SamuZad/googleworkspace/latest/docs

The specific commit can be found here: SamuZad@86270a6

Since implementing this, timing out during this operation has gone away completely, with no other problems cropping up 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants