-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
storage
: fix google_storage_bucket
429 Error
#11550
storage
: fix google_storage_bucket
429 Error
#11550
Conversation
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 107 Click here to see the affected service packages
View the build log |
It appears that the 409 error comes from a GET not being performed which would check whether or not the bucket creation been has successful or not. The request below has been performed on buckets that show up in state, this is followed after a POST of the bucket creation ---[ REQUEST ]---------------------------------------
GET /storage/v1/b/mau-my-bucket-20240515-4?alt=json&prettyPrint
Host: storage.googleapis.com
User-Agent: google-api-go-client/0.5 Terraform/1.8.0-alpha20240
X-Goog-Api-Client: gl-go/1.20.11 gdcl/0.152.0
Accept-Encoding: gzip It was found in the logs that buckets that are missing the GET request would respond with the panic below: │ Error: timeout while waiting for state to become 'success' (timeout: 1m0s)
│
│ with module.bucket[123].google_storage_bucket.standard,
│ on module/main.tf line 3, in resource "google_storage_bucket" "standard":
│ 3: resource "google_storage_bucket" "standard" { |
After some testing this morning it looks to be working flawlessly when attempting to provision 1000 buckets: Marking as ready for review in order to get some feedback on this solution since it's very unclear what changed when testing from yesterday to testing from today. The provider "google" {
project = "INSERT-PROJECT-ID"
region = "us-central1"
credentials = file("${path.module}/key.json")
}
module "bucket" {
count = 1000
source = "./module"
index = count.index
}
variable "index" {}
resource "google_storage_bucket" "standard" {
name = "mau-2-my-bucket-20240828-${var.index}"
location = "us-central1"
force_destroy = true
public_access_prevention = "enforced"
uniform_bucket_level_access = true
} Let me know your thoughts @ScottSuarez ! |
@ScottSuarez This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me!
Fixes hashicorp/terraform-provider-google#18132
We add in a 429 Retry Predicate for when users run into quota limit issues when attempting to provision a high amount of storage buckets in a short time.
Still in draft due to needing to fix a
409
error:Release Note Template for Downstream PRs (will be copied)