-
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
parsing segment "staticResourceGroups": expected the segment "resourcegroups" to be "resourceGroups" #18244
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@liuwuliuyun this isn't a bug - previously the validation didn't validate this casing when it should have been - this needs to be resolved by correcting the user input / adding a state migration as required. |
Duplicate of #18235 - looks like we need a state migration here to account for the wrong Resource ID casing being imported previously |
Same for @tombuildsstuff Why is this not a bug? Everything works with azurerm version 3.20. Now with 3.21 existing, previous, working deployments are brocken/blocked because of this error. So this is definitely a bug in azurerm which should to be fixed immediately. Azure Resource IDs are and were never case sensitive. So why does care the azurerm provider now after a minor update (which should not included breaking changes) suddenly about the casing of Azure Resource IDs!? |
@tombuildsstuff any chance this can be reopened as it appears unrelated to #18235 and the fixes in 3.22.0 did not correct the issue. I've done some further debugging and the lower cased "resourcegroup" in the ID is stored in Azure and is being returned by an API call during the plan stage.
There appears to be no work around other that destroying the resource outside of Terraform or deleting the current resource from state. Also changing the case of the Workspace resource ID had no impact on the value stored in Azure using a provider version prior to 3.21.0 Happy to send on the full diagnostics trace if needed. |
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
1.2.8
AzureRM Provider Version
3.21.1
Affected Resource(s)/Data Source(s)
azurerm_security_center_workspace
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Resource deploys successfully similar to 3.18.0
Actual Behaviour
│ Error: Reading Security Center Log Analytics Workspace ID: parsing "/subscriptions/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/resourcegroups/rg-01/providers/microsoft.operationalinsights/workspaces/law-management-01": parsing segment "staticResourceGroups": expected the segment "resourcegroups" to be "resourceGroups"
│
│ with module.shared.azurerm_security_center_workspace.this,
│ on ../modules/subscription/main.tf line 46, in resource "azurerm_security_center_workspace" "this":
│ 46: resource "azurerm_security_center_workspace" "this" {
Steps to Reproduce
Upgraded from 3.18.0 to 3.21.1 and the deployment of azurerm_security_center_workspace is now requiring title case for "resourceGroups" in the workspace_id.
Our configuration has the resource ID in lower case.
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: