-
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
Resource azurerm_user_assigned_identity
-> parsing segment "staticResourceGroups": expected the segment "resourcegroups" to be "resourceGroups"
#14853
Comments
azurerm_user_assigned_identity
-> parsing segment "staticResourceGroups": expected the segment "resourcegroups" to be "resourceGroups"
This may be related to #14456. |
@tombuildsstuff Why is this labeled as a question? This worked previously and it's keeping us from updating the provider version, because otherwise we can not deploy our software... |
This issue is also happening for us on
CONFIGIn my file, I have 2 resources, one key vault and one databricks workspace which use the same eventhub for diagnostic settings. TESTINGDebugging LogsI've ran the plan command using Databricks return the Key Vault return the Postman testI've tested using postman against the API URL : And with available API version from Microsoft Documentation, and the result is always the same. Manually create the diagnostic settingsI've dig further and found that all lower case
CONCLUSIONI'm not familiar with the code behind the terraform provider, I'm wondering if :
Hope this clarify the issue. LB |
I have the same issue where #14456 didn't fit the case issue.
When importing it looks like Case is being enforced and Azure is not the best at keeping this uniformed.
How I fixed (Do this at your own risk)
|
I'm getting this issue with azurerm_function_app resource under the key_vault_reference_identity_id parameter. Manually modifying the state file should not be the solution. |
Experiencing the same with diagnostic settings and AzureRM 3.21.1, Terraform version 1.2.8. Seems to be related to updating from v2 to v3, but we didn't see this immediately. Took a few days for it to appear. |
Any fix for this? |
We just downgraded to 3.20.0 and everything worked again. Can't find anything in the changelog regarding this, but haven't tested 3.22.0 yet. |
Tested and works for me as well on 3.20.0 |
same behavior with diagnostic settings on the storage account. Works on 3.20; broken on 3.22 and 3.23. API returns |
Deleting the diagnostic settings manually in azure and recreating them with terraform worked for me. |
`azurerm_monitor_diagnostic_settings`: fix casing parsing `azurerm_user_assigned_identity`: fix casing parsing Fixes hashicorp#14853
`azurerm_monitor_diagnostic_settings`: fix casing parsing `azurerm_user_assigned_identity`: fix casing parsing `azurerm_security_center_workspace`: fix casing parsing Fixes hashicorp#18346 Fixes hashicorp#14853 Fixes hashicorp#18360
I'm getting similar issue in servicebus context. Error: parsing "/subscriptions/xxx/resourcegroups/rg-xxx/providers/Microsoft.ServiceBus/namespaces/sb-xxx/queues/queue-xxx/authorizationrules/xxx": parsing segment "staticResourceGroups": expected the segment "resourcegroups" to be "resourceGroups" with module.xyz.azurerm_servicebus_queue_authorization_rule.app, |
The same happens for me. |
We have a similar issue with an existing log analytics workspace after upgrading to azurerm 3.42.0.
|
Same thing is happening with azurerm_user_assigned_identity
Provider version hashicorp/azurerm v3.44.1 |
I'm getting the same attempting to import an AKS cluster:
Terraform v1.3.9 with provider v3.44.1 (and also with v.3.42.0). EDIT TO ADD: I was able to work around this by changing the ID parameter of the @@ -1 +1 @@
-terraform import ${RESOURCE_ADDR} /subscriptions/${SUBSCRIPTION_ID}/resourcegroups/${RESOURCE_GROUP}/providers/Microsoft.ContainerService/managedClusters/r${CLUSTER_NAME}
+terraform import ${RESOURCE_ADDR} /subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.ContainerService/managedClusters/r${CLUSTER_NAME} Don't know if that'll be of any use to anyone else. |
As per the error message being returned here, the Resource ID provided at import time doesn't match what's expected for the
however you're specifying:
Since the segment being provided (
As such you can fix this by updating the |
👋 There's a few different issues at play here which all surface the same error message, but these are all related to the Resource ID format not matching what we're expecting, but these generally fall into:
In either case should the Resource ID casing differ from what we're expecting, then we'll highlight this issue when trying to parse the Resource ID - as in the error above Whilst we endeavour to provide State Migrations to automatically update the Resource ID casing where this changes - unfortunately if the Resource has previously been imported in a differing casing, there's not much we can do to workaround this unfortunately - and these'll need to be fixed by updating the Terraform Configuration / removing and re-importing this resource into your Statefile as needed. As such if you're encountering this error message we'd encourage you to double-check the casing being specified matches the Resource ID format for the relevant Resource - but if you're still having an issue please feel free to open a new issue and we can clarify which it is. However since the original issue here appears to be fixed (in #18467) and this has become a bit of a catch-all, I'm going to close this issue for the moment - but if you're still seeing this issue in the latest version of the Provider then please feel free to open a new issue and we can dig into what's going on here. Thanks! |
Sorry to reopen this but it is still happening :( Error: parsing "/subscriptions/xxx/resourcegroups/xxx/providers/microsoft.operationalinsights/workspaces/xxx": parsing segment "staticResourceGroups": expected the segment "resourcegroups" to be "resourceGroups" Terraform version 1.3.7 |
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. |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v1.1.3 on windows_amd64
Affected Resource(s)
azurerm_user_assigned_identity
Terraform Configuration Files
Panic Output
Expected Behaviour
Plan/Refresh succeeds
Actual Behaviour
Plan/Refresh fails with above error
Steps to Reproduce
terraform plan
Important Factoids
This still works on version 2.87.0, so a change must have happened in a higher version.
The text was updated successfully, but these errors were encountered: