Skip to content
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

fix(artifact-registry): fix a move issue with tf>1.7 #2617

Merged

Conversation

NitriKx
Copy link
Contributor

@NitriKx NitriKx commented Oct 11, 2024

Happy to be the first one to complain πŸ™‚

As mentionned by @juliocc in #2606 the move is failing if we transfer the resource to the non-beta provider:

β”‚ The "google_artifact_registry_repository_iam_binding" resource type does
β”‚ not support moving resource state across resource types.

The TF 1.8 has introduced a new feature that makes the move failing (I was testing with 1.7 in #2606):

Providers can now transfer the ownership of a remote object between resources of different types, for situations where there are two different resource types that represent the same remote object type.
This extends the moved block behavior to support moving between two resources of different types only if the provider for the target resource type declares that it can convert from the source resource type. Refer to provider documentation for details on which pairs of resource types are supported.
https://github.com/hashicorp/terraform/blob/v1.8/CHANGELOG.md#180-april-10-2024


Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

The TF 1.8 has introduced a new feature that makes the move failing:
> Providers can now transfer the ownership of a remote object between resources of different types, for situations where there are two different resource types that represent the same remote object type.
> This extends the moved block behavior to support moving between two resources of different types only if the provider for the target resource type declares that it can convert from the source resource type. Refer to provider documentation for details on which pairs of resource types are supported.
https://github.com/hashicorp/terraform/blob/v1.8/CHANGELOG.md#180-april-10-2024
Copy link
Collaborator

@juliocc juliocc left a comment

Choose a reason for hiding this comment

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

I won't say "I told you" ;)

@juliocc juliocc merged commit ce09c07 into GoogleCloudPlatform:master Oct 11, 2024
14 checks passed
@NitriKx NitriKx deleted the bsa/fix-artifact-registry-move branch October 11, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants