Hello all,
Had a bit of a terraform disaster on some buckets that were using authoritative IAM policies. It seems that all accounts that did access to the bucket now do not. Including the owner and org admin accounts.
I've also tried using the org admin account to reset the policy but can't even view the current policy.
Is there any backdoor to reset a bucket to project default IAM?
Hi @pwolfe
Unfortunately, there isn't a "backdoor" way to reset IAM policies without the proper permissions but you may try the following workarounds:
gcloud storage buckets update BUCKET_NAME --project=YOUR_PROJECT_ID --no-iam-policy
terraform plan
terraform apply
This can help Terraform realize the changes it needs to revert, but you’ll need to ensure your state file isn’t corrupted and properly synced with the infrastructure.If none of the above steps work and you’re still unable to access or modify the bucket IAM policies you can contact Google Cloud Support to further look into your case. When contacting them, please provide comprehensive details and include screenshots. This will help them better understand and address your issue.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.