-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
google_logging_metric create fails if missing bucket_options.exponential_buckets.num_finite_buckets #12964
Comments
Looks like
|
Unfortunately, making these all required would be a breaking change. I'll mark this as such and we'll consider it for the next major release. Sorry about that! |
Megan, to be clear, do you mean changing this to be required would be a breaking change? I think the intended, and documented, behavior is to be optional, but as it stands they are currently defacto required by code |
@mattalbr currently you see the error when you apply the config. With the proposed change, it will be in the plan. |
Got it! Huge fan of any validation errors going from apply -> plan, that's one of my biggest frustrations with some of the google/hashicorp integration points and would make the developer experience way better. If we've decided that having them required is indeed the intended behavior though, would be great to at least update the documentation regardless of where the error happens. |
I apologize for the confusion. The Advanced (Histogram buckets) section is optional. However, if you choose to configure this section, the number of finite buckets (num_finite_buckets) is required for both the Exponential and Linear types. |
@pengq-google Referring to the API documentation, if |
closed with GoogleCloudPlatform/magic-modules#8780 This will release with v5.0.0. Check #15582 for more details on the major release. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.3.2
on linux_arm64
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/mattalbr/57f256d98431f1359f3d0d8d005ff27d
Panic Output
N/A
Expected Behavior
num_finite_buckets is listed as optional in the documentation, so I expect it to create successfully when not specified in the configuration
Actual Behavior
│ Error: Error creating Metric: googleapi: Error 400: Bucket options are invalid: Distribution |bucket_options.exponential_buckets| has a |num_finite_buckets| of 0, which is less than 1.
│
│ with google_logging_metric.response_latency,
│ on metrics.tf line 34, in resource "google_logging_metric" "response_latency":
│ 34: resource "google_logging_metric" "response_latency" ***
│
╵
Steps to Reproduce
terraform apply
Important Factoids
N/A
References
N/A
b/293328011
The text was updated successfully, but these errors were encountered: