terraform-azurerm-lz-vending
terraform-azurerm-lz-vending copied to clipboard
bug: incorrect validation on subscription display name
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
Versions
Terraform v1.8.2
Please enter the module version that you are using:
4.1.0
Description
subscription display name validation fails for subscription with valid names. e.g. you can have brackets in a subscription display name
hashicorp's validation is much less strict
https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/subscription/validate/subscription_name.go
if len(v) > 64 || v == "" {
errors = append(errors, fmt.Errorf("Subscription Name must be between 1 and 64 characters in length"))
}
if regexp.MustCompile("[<>;|]").MatchString(v) {
errors = append(errors, fmt.Errorf("Subsciption Name cannot contain the characters `<`, `>`, `;`, or `|`"))
}
```
I struggle to find the source of truth in the API specs, perhaps i'm looking in the wrong place, I tried looking here - https://github.com/Azure/azure-rest-api-specs