Azure / Azure/azure-rest-api-specs
[BUG]: Microsoft.DocumentDB/mongoClusters/firewallRules - Name parameter regex pattern incorrect
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/b713df239eb640a56fb4b4db9648ad4bf1388e3b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-10-01-preview/mongoCluster.json#L593
### API Spec version
2024-02-15-preview
### Describe the bug
There is a regex specified for the 'firewallRule' name parameter, that is ^[a-zA-Z0-9][-_.a-zA-Z0-9]* ([ref](https://github.com/Azure/azure-rest-api-specs/blob/b713df239eb640a56fb4b4db9648ad4bf1388e3b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-10-01-preview/mongoCluster.json#L593)), which is great, as it is pulled from here and published in all kinds of documentation.
There is one catch though, and that is that it 'seems' the regex is not 100% correct, and the character . is actually not allowed in the name.
> **Note:** Using `.` was still working some 4-5 months ago for the given API version. Only afterwards it started to produce issues and it took us quite a while to figure out why (as there is no error and the deployment just times out)
### Expected behavior
Either `.` should be removed from the validation pattern - or - if it should actually be alowed by the service.
### Actual behavior
Trying to deploy a firewall-rule with a `.` in its name leads to an internal server error and a non-terminating deployment (i.e., it run's forever until it eventually times out).
### Reproduction Steps
Try to deploy a firewall rule with `.` in its name. E.g. `allow-1.2.3.4-to-5.6.7.8`
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.