Ability to transfer user data before deletion
Closed this issue · 1 comments
Affected Resource(s)
google_workspace_user
Feature Request
When I delete a google workspace user from the admin interface, I'm allowed to transfer their data as part of the process. (see this doc)
We're transitioning to managing all google users through this provider and would like to retain this functionality. I imagine a new block could be added to the resource like such:
resource "googleworkspace_user" "dwight" {
primary_email = "dwight.schrute@example.com"
...
transfer_data_upon_deletion {
target_user_email = "admin@example.com"
transfer_email = true
transfer_drive_files = true
transfer_...
}
Potential Issues
I'm unsure how the admin console juggles data transfer before user deletion. If Terraform initiates the data transfer and then deletes the user, will Google know to queue the deletion to happen after the transfer finishes, or will the deletion call fail? (or worse: will the transfer be aborted?)
References
A quick search makes me think this is the data transfer API used by the admin console.
Not sure how this dupe showed up, but closing in favor of #397