-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: Failed to serialize resource instance in state: Instance" in terraform import in v1.3.0 #31851
Comments
I have the same issue in
This behavior seems similar to the one reported to the plugin SDK Issue #1066, where a data source is erroneously compared to a resource. |
Same problem here - trying to import a resource and we exhibit: Instance data.azurerm_key_vault_secret.machine_login_credentials has status ObjectPlanned, which cannot be saved in state. My use case is a generated Azure Key Vault secret. |
Same and what to do?
|
I have also seen this using AWS provider. Downgrade to 1.2.7 fixed it. |
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. |
Terraform Version
Terraform Configuration Files
simplified/cropped configuration
Debug Output
Crash output in "Actual Behavior"
Expected Behavior
Everything is fine with Terraform 1.2.9
Actual Behavior
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform.
Please report the crash with Terraform1 so that we can fix this.
When reporting bugs, please include your terraform version, the stack trace
shown below, and any additional information which may help replicate the issue.
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Failed to serialize resource instance in state: Instance module.client.module.env_config_generator.module.blob_connection.data.azurerm_managed_api.type has status ObjectPlanned, which cannot be saved in state.
goroutine 1 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x19
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/home/circleci/project/project/internal/logging/panic.go:55 +0x153
panic({0x23c03c0, 0xc00c0cb488})
/usr/local/go/src/runtime/panic.go:890 +0x262
github.com/hashicorp/terraform/internal/states/statefile.StatesMarshalEqual(0xc004759880, 0xc001e9c8f0)
/home/circleci/project/project/internal/states/statefile/marshal_equal.go:31 +0x191
github.com/hashicorp/terraform/internal/states/remote.(*State).PersistState(0xc00159f1a0, 0x0?)
/home/circleci/project/project/internal/states/remote/state.go:164 +0x106
github.com/hashicorp/terraform/internal/command.(*ImportCommand).Run(0xc000125860, {0xc0000ce020, 0x3, 0x6})
/home/circleci/project/project/internal/command/import.go:265 +0x1f5f
github.com/mitchellh/cli.(*CLI).Run(0xc000604c80)
/home/circleci/go/pkg/mod/github.com/mitchellh/[email protected]/cli.go:262 +0x5f8
main.realMain()
/home/circleci/project/project/main.go:315 +0x15f4
main.main()
/home/circleci/project/project/main.go:58 +0x19
Steps to Reproduce
A new environment with few resources that must be first imported
Terraform import
Additional Context
No response
References
Split from
The text was updated successfully, but these errors were encountered: