Skip to content

Conversation

bbasata
Copy link
Contributor

@bbasata bbasata commented Jul 31, 2025

Related Issue

#366, an attempt to fix failing tests in Failing test in hashicorp/terraform-plugin-framework#1193.

Description

#366 worked ... only for Terraform 1.12+. TestMoveResourceState now fails in hashicorp/terraform-plugin-framework#1193 for Terraform 1.8 – 1.11 because Resource Identity is not supported.

So let's take a step back. This PR splits MoveStateResource into two resources: one with Resource Identity and one without Resource Identity.

Using hashicorp/terraform-plugin-framework#1193:

➜  corner git:(statemover2) TF_ACC_TERRAFORM_PATH=~/bin/terraform_1.11.0 go test ./internal/framework{5,6}provider -run=MoveStat
ok  	github.com/hashicorp/terraform-provider-corner/internal/framework5provider	2.670s
ok  	github.com/hashicorp/terraform-provider-corner/internal/framework6provider	2.991s

➜  corner git:(statemover2) TF_ACC_TERRAFORM_PATH=~/bin/terraform_1.13.0-beta1 go test ./internal/framework{5,6}provider -run=MoveStat
ok  	github.com/hashicorp/terraform-provider-corner/internal/framework5provider	4.423s
ok  	github.com/hashicorp/terraform-provider-corner/internal/framework6provider	4.294s

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

@bbasata bbasata requested a review from a team as a code owner July 31, 2025 13:42
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these resources just be updated to ensure the identity is returned via Read? That's how a normal resource would operate since it's not expected for the resource to care whether the client supports identity or not, if the identity schema exists in the provider it should always return the identity.

@austinvalle
Copy link
Member

I think we have a slightly quicker way to approach what we are trying to achieve with this test. Will open a separate PR 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants