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

Add support for moving resources from gavinbunney/kubectl #123

Open
stevehipwell opened this issue Apr 11, 2024 · 3 comments
Open

Add support for moving resources from gavinbunney/kubectl #123

stevehipwell opened this issue Apr 11, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@stevehipwell
Copy link
Contributor

With the release of Terraform v1.8 support for moving resources between providers has been added (this is also due to land in OpenTofu 1.8). It would be great if this provider could support moving resources from the original provider, gavinbunney/kubectl, to make switching this out much easier.

Looking at the code here it looks like you'd need to migrate to the Terraform Plugin Framework to make use of the updated state move functionality, so that is probably the major constraint here.

@alekc
Copy link
Owner

alekc commented Apr 11, 2024

Hmm, I am a bit confused here. Since this project has been originally forked from the gavinbunney's, all you need to do is to change the provider definition and run
terraform state replace-provider gavinbunney/kubectl alekc/kubectl

?

@stevehipwell
Copy link
Contributor Author

@alekc you can use the terraform state replace-provider command, but there are a number of issues with this pattern especially when working with modules.

  • It requires all resources to be moved at one
    • This is particularly difficult to coordinate when there are multiple modules in a workspace
  • It requires direct access to the state
    • In a least privileged environment this would require additional automation to be added
  • It requires additional steps
    • Anyone taking a updated module would need to know to run the manual command
    • All modules and resources would need to move at once

We actually did the whole process of releasing all new module versions to align the providers, creating provider replace automation, and then documenting & supporting multiple teams to complete the process. It was painful.

@alekc
Copy link
Owner

alekc commented Apr 11, 2024

Fair enough. I will have a look into it (can't promise timeframe though)

@alekc alekc added the enhancement New feature or request label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants