Closed grongor closed 1 month ago
I just ran into the same issue. Thanks for your work @grongor.
Would be great to get this fixed or to get some documentation in case we are missing something here.
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.
Awesome, thanks for the quick reaction!
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
Thanks to @grongor for the PRs! 🎸
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 https://github.com/hashicorp/terraform-plugin-go/pull/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
https://github.com/hashicorp/terraform-plugin-framework/pull/1038 https://github.com/hashicorp/terraform-plugin-go/pull/432