-
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
panic: interface conversion: interface {} is []interface {}, not string in version 4.1.0 #27308
Comments
I've had to pull my provider version back to Not ideal considering I'd made changes that incorporated some new features. Any help regarding this would be great but for now I'm unblocked. |
This happened to me after I applied with 4.0.1, and then tried to apply again with 4.1.0. Solved by manually editing the state file and changing |
Thanks for raising this issue. Seems I can't reproduce this issue after the version is upgraded from 3.116.0 to 4.1.0. Please check and ensure if "ip_range_filter" is string type in the state file. If yes, please directly update to 4.1.0 to see if the issue still exists? Thanks. tf config:
Reproduce steps:
|
I can reproduce using @neil-yechenwei's config using these steps:
So it seems to affect configs that first upgraded to 4.0.1 using the remove/import workaround, then upgrade to 4.1.0. ETA: Removing and re-importing the account under 4.1.0 works, as does going directly from 3.116.0 -> 4.1.0 without first going to 4.0.1. |
I also get the panic if I create the resources under 4.0.1 and then upgrade to 4.1.0. Removing and re-importing also fixes things in this situation. |
Getting the same error after remove/import on 4.0.1 and now going to version 4.1.0 |
I'm also getting the same error after remove/import cosmos db account on 4.0.1 and now going to version 4.1.0 from version 4.0.1. |
v3.115.0 -> v4.0.1 broke v4.0.1 -> v4.1.0 broke as this provider error in OP. If you fixed your state file manually by removing that field or reimported the cosmosdb then your Fixed the bug from earlier and then create a new bug. Lol. Note: I didn't reimport my resource, I modified the state file which is not best practice.. So not sure the behaviour of |
@dansali, I don't want to change the state files by own. I have many cosmos db accounts and remove/reimport took me 2 days to complete it as a workaround for the previous version. now again doing the same for this version will cause any issue in next version. Better I will wait for fixing this issue fully in next release will help me with small work. I could see you merged some code and do we need to remove and reimport resource from tfstate file for cosmosdb account? or can we wait for next release to fix this issue fully? |
You could enforce your azurerm provider to v4.0.1 to bypass this issue until it's hopefully fixed in a future release. @babuga365 I think that could work |
@babuga365 I recommended a fix for this one for the developer who wrote this. I didn't merge anything, just went through same issue migrating from v4.0.1 to v4.1.0 |
@orgads thanks for the workaround, it worked here! |
@dansali , I have already migrated from v3.116.0 to v4.0.1 |
There is a fix for the panic during migration from |
Is there an existing issue for this?
Community Note
Terraform Version
Terraform v1.9.5 on linux_amd64
AzureRM Provider Version
provider registry.terraform.io/hashicorp/azurerm v4.1.0
Affected Resource(s)/Data Source(s)
azurerm_cosmosdb_account
Terraform Configuration Files
The text was updated successfully, but these errors were encountered: