You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've spent several hours trying to figure out why I can't use the moved block with my provider...and I'm quite sure the reason is that nobody actually bothered to test this functionality before. I may be wrong, but...PR #1038 fixes it. Also see hashicorp/terraform-plugin-go#432.
moved {
from=my_old_resource.loremto=my_resource.ipsum
}
Debug Output
I think it's not relevant
Expected Behavior
I'd expect to see a panic...or to be more precise, I'd expect that terraform plan would execute the MoveState method of my providers resource.
Actual Behavior
│ Error: Unsupported `moved` across resource types
│
│ on main.tf line 135:
│ 135: moved {
│
│ The provider "X" does not support moved operations across resource types and providers.
Hey all 👋🏻, that definitely is a bug in framework, I'll take a look at the PRs soon. Not sure how this was missed, but I'd guess there aren't a ton of usages of MoveResource outside of the major providers (aws mostly), which all rely on terraform-plugin-mux that has it's own surfacing of capabilities.
Regardless, we'll get this fixed and release a patch fix for framework + plugin-go sometime this week.
The fix has been merged (alongside additional logging that will be released in a new version of terraform-plugin-go) and will be released later this week.
For development, if you'd like to test out the changes before that:
go get -u github.com/hashicorp/terraform-plugin-go@94d8cc586c2073a1206149acde3768d35b9e77b7
go get -u github.com/hashicorp/terraform-plugin-framework@ba1098a5813d88ab817ba1c8d70a6d1b58793660
go mod tidy
Note that both Go modules will also be updated to require minimum Go 1.22, so you may also need to bump your Go version for your provider
I've spent several hours trying to figure out why I can't use the
moved
block with my provider...and I'm quite sure the reason is that nobody actually bothered to test this functionality before. I may be wrong, but...PR #1038 fixes it. Also see hashicorp/terraform-plugin-go#432.Module version
Relevant provider source code
Terraform Configuration Files
Debug Output
I think it's not relevant
Expected Behavior
I'd expect to see a panic...or to be more precise, I'd expect that
terraform plan
would execute theMoveState
method of my providers resource.Actual Behavior
Steps to Reproduce
Try implement the move in your provider.
References
#1038
hashicorp/terraform-plugin-go#432
The text was updated successfully, but these errors were encountered: