Skip to content

"no user project provided" error on bucket creation/refresh when specifying requester_pays = true #22452

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

Open
tferazzi opened this issue Apr 22, 2025 · 0 comments
Labels
bug forward/review In review; remove label to forward service/storage

Comments

@tferazzi
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.11.4
on darwin_arm64

  • provider registry.terraform.io/hashicorp/google v6.30.0
  • provider registry.terraform.io/hashicorp/google-beta v6.30.0

Affected Resource(s)

google_storage_bucket

Terraform Configuration

resource "google_storage_bucket" "my_bucket" {
  name                     = "my-bucket-name"
  location                 = "europe-west4"
  requester_pays           = true
  public_access_prevention = "enforced"
}

Debug Output

No response

Expected Behavior

Bucket created with requester_pays enabled, every following bucket interaction is possible.

Actual Behavior

Bucket created with requester_pays enabled, every following bucket interaction fails with:
Error reading bucket after update: googleapi: Error 400: Bucket is a requester pays bucket but no user project provided.

And there's no (resource-)option to specify a "user project".

Steps to reproduce

  1. terraform apply
  2. terraform refresh

Important Factoids

  • Prerequisites for requester pays exactly describes the error. I have Owner permissions on the project I want to create the bucket in.
  • Explicitly specifying project on the bucket resource did not change anything

References

Accessing request-pays enabled buckets -> Works fine for a user interacting with the bucket, but not when terraform interacts with the bucket.

@tferazzi tferazzi added the bug label Apr 22, 2025
@github-actions github-actions bot added forward/review In review; remove label to forward service/storage labels Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug forward/review In review; remove label to forward service/storage
Projects
None yet
Development

No branches or pull requests

1 participant