-
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 Error in "azurerm_media_services_account" with azurerm 3.34.0 #19556
Comments
… validation function Spotted via #19556
hi @Sanorikos Thanks for opening this issue. As mentioned in the error message here:
.. Terraform's expecting the Resource ID to match a given format but a different casing is being specified, taking a looking through here the Resource ID being specified:
versus the Resource ID we're expecting the format:
Unfortunately taking a look through here it appears that the import documentation is out of sync here, as such I've opened #19557 to get that updated - however it should be possible to fix this by updating the casing on the Resource ID value being specified (that is The behaviour of the Azure API is inconsistent insofar as Resource IDs are supposed to be case-insensitive during Requests and case-sensitive during Responses. Unfortunately, a number of API's don't behave in this manner and silently fail (in really subtle ways) when the casing doesn't match what the API is expecting. As such we're ultimately moving towards validating Resource IDs match the casing that's expected, which'll allow us (in the medium-term) to workaround these API/casing issues. However (as in this case) some user input may need updating to ensure the casing matches. Whilst that's unfortunate that's affected you in this case, as mentioned above it should be possible to workaround this by updating the casing here, which'll allow Since this should be fixed by updating the casing being used here, I'm going to close this issue for the moment however please let us know if that doesn't work for you and we'll take another look. Thanks! |
We have the same issue, and we had to search and replace all instances of:
in our all states. I'm writing this here because I'm sure others will encounter the same issues due to Azure's inconcistent naming convention. |
This should be case-insensitive parsing the old ID, as such this isn't guaranteed to have been successful (culminating in #19556, which also occurs via a state upgrade) as such this fixes this state migration.
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.3.6
AzureRM Provider Version
3.34.0
Affected Resource(s)/Data Source(s)
azurerm_media_services_account
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
With azurerm 3.33.0
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are
needed.
Actual Behaviour
With azurerm 3.34.0
╷
│ Error: parsing "/subscriptions/xxxxxx/resourceGroups/xxxx-media/providers/Microsoft.Media/mediaservices/xxxxmediaaccmain": parsing segment "staticMediaServices": expected the segment "mediaservices" to be "mediaServices"
│
│ with module.mediaServicesAccount.azurerm_media_services_account.account,
│ on .terraform/modules/mediaServicesAccount/main.tf line 1, in resource "azurerm_media_services_account" "account":
│ 1: resource "azurerm_media_services_account" "account" {
│
╵
Steps to Reproduce
terraform init
terraform plan
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: