-
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
Less helpful "Number of label descriptors must match number of label extractors" error #20872
Comments
Perhaps the possibility of changing the error message to make it more intuitive for users and adding a warning to the terraform registry documentation indicating how the |
To replicate the error just use the shared code, and to avoid errors uncomment the |
The uncommented lines showed what I missed initially when I get the error. With those lines it works of course. My points were:
|
Thanks for adding this so it can be considered |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.5.4
on linux_amd64
Affected Resource(s)
google_logging_metric
Terraform Configuration
Debug Output
Error: Error creating Metric: googleapi: Error 400: Number of label descriptors must match number of label extractors
Expected Behavior
the error should probably say "Number of metric_descriptor.label blocks must match number of label_extractors" as there is no label_descriptor. Also I would assume terraform plan to complain about it and not terraform apply.
Actual Behavior
terraform validate and terraform plan works, apply fails with not so helpful error.
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/390469720
The text was updated successfully, but these errors were encountered: