-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_api_management_api path validation restricts single character strings #26921
Comments
I will submit the PR to update the regex to allow single character strings for the path variable. |
AnalysisAssume I want to use the string "a" for the Path variable. The existing regex is at https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/apimanagement/validate/api_management.go#L79 which is To match the string "a", it must:
Given the existing regex, the string "a" would not match because it requires at least two characters in the non-empty case (one for [\w.] and one for [\w-]). |
The regex should be modified to have the section |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
0.14.10
AzureRM Provider Version
3.114.0
Affected Resource(s)/Data Source(s)
azurerm_api_management_api
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
A path with a single character should be allowed as it is possible to create such an API from the Azure Portal.
The errors is coming from the validate method. The regex is incorrect and should be updated to allow a single character.
Actual Behaviour
Got the error message stating the path variable is not valid.
Steps to Reproduce
terraform apply for a resource as described in the
Terraform Configuration Files
section of the issueImportant Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: