You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
resource"google_pubsub_topic""foo" {
name="foo"labels={
Team ="Foobar"
}
}
Debug Output
No response
Expected Behavior
Plan should fail if the labels aren't valid
Actual Behavior
Plan / validate succeeds, then apply fails with
Error: Error creating Topic: googleapi: Error 400: You have passed an invalid argument to the service (argument=Invalid labels: Invalid field "labels"; key "Team" does not conform to regular expression "[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}"; first character "T" is not a non-uppercased letter (Unicode character class Ll or Lo)).
From spot-checking other resources, it seems like this is true with other services as well?
I recognize this may just be something that TPG can't validate before apply-time, but this seems like a common enough use case that, at least if it's consistent across resources, and there are no plans to allow upper-case characters in labels in the future, might be worth considering some provider level validation on?
Most services should follow the unified formatting rules for labels (user labels and system labels). I am not sure if all of the services follow the rules.
User labels and system labels have different formatting rules. But they are not distinguished and all put into labels field.
Community Note
Terraform Version & Provider Version(s)
Terraform v1.11.3
on darwin_arm64
Affected Resource(s)
google_*
Terraform Configuration
Debug Output
No response
Expected Behavior
Plan should fail if the labels aren't valid
Actual Behavior
Plan / validate succeeds, then apply fails with
From spot-checking other resources, it seems like this is true with other services as well?
I recognize this may just be something that TPG can't validate before apply-time, but this seems like a common enough use case that, at least if it's consistent across resources, and there are no plans to allow upper-case characters in labels in the future, might be worth considering some provider level validation on?
Steps to reproduce
terraform apply
Important Factoids
No response
References
terraform-linters/tflint-ruleset-google#413
The text was updated successfully, but these errors were encountered: