-
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_management_group validation should allow spaces #6757
Comments
There is a related powershell issue (found by a google of the error message in the code comment) here: Azure/azure-powershell#11718 |
Hi @tom-dudley thanks for this issue!
As a summary of all the relative reasons above, we name the ID in portal as Back to the question you are asking in this issue, you are trying to get the data source of a management group by using its |
@ArcturusZhang Thanks very much for the detailed response. I fully appreciate that you're just going off the current request/response properties available in the REST API. You have helped highlight that it was indeed the Regarding the not-yet-existing |
Yes, the |
This has been released in version 2.15.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.15.0"
}
# ... other configuration ... |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform version: 0.12.8
AzureRM version: 2.0.0
Affected Resource(s)
azurerm_management_group
data.azurerm_management_group
Debug Output
can only consist of ASCII letters, digits, -, _, (, ), . , and cannot exceed the maximum length of 90
Output as shown here: https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/internal/services/managementgroup/validate/management_group.go#L17-L20
Expected Behavior
Successful terraform plan
Actual Behavior
Validation fails due to regex not allowing for a space in management group names
Steps to Reproduce
terraform plan
References
While the code does contain a comment about validation being shown in the portal, I couldn't find it. Management groups can still be created with spaces. Existing documentation suggests this is also the case too. E.g.: https://docs.microsoft.com/en-us/azure/governance/management-groups/create#create-in-portal
The text was updated successfully, but these errors were encountered: