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

Corrected the key name used for SkipPlan in state migration from "to_skip_plan" to "skip_plan". #193

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

SuperHiroki
Copy link
Contributor

@SuperHiroki SuperHiroki commented Nov 30, 2024

In README.md, key name used for SkipPlan in state migration is "skip_plan".
But in tfmigrate/state_migrator.go, key name used for SkipPlan in state migration is "to_skip_plan".

I followed README.md and got an error "Unsupported argument; An argument named ‘skip_plan’ is not expected here".
When I changed the key name to "to_skip_plan" from "skip_plan", no error occurred.

@minamijoyo
Copy link
Owner

@SuperHiroki Good catch!

This feature was introduced in the multi_state migration and then implemented in the single-state migration, so it appears to be a bug from then.

I agree that the bug should be fixed. Still, I'm concerned that the fix will introduce an incompatible change to the syntax of the HCL file, so I will try to see if we can maintain backward compatibility before cutting the next release. Thanks!

@minamijoyo minamijoyo merged commit 5357815 into minamijoyo:master Dec 3, 2024
9 checks passed
minamijoyo added a commit that referenced this pull request Dec 3, 2024
This is a follow-up to #193. Renaming the `to_skip_plan` attribute in a
single-state migration block to `skip_plan` was an incompatible change
to the HCL file's syntax. Since it is technically possible to maintain
backward compatibility, we will continue to accept the old
`to_skip_plan` and log a warning. This attribute will be removed in a
future version. Use `skip_plan` instead.
minamijoyo added a commit that referenced this pull request Dec 3, 2024
This is a follow-up to #193. Renaming the `to_skip_plan` attribute in a
single-state migration block to `skip_plan` was an incompatible change
to the HCL file's syntax. Since it is technically possible to maintain
backward compatibility, we will continue to accept the old
`to_skip_plan` and log a warning. This attribute will be removed in a
future version. Use `skip_plan` instead.
@minamijoyo
Copy link
Owner

Fixed in v0.4.1 🚀

@SuperHiroki
Copy link
Contributor Author

@minamijoyo
Thank you for merging the PR!!
And Thank you for developing "tfmigrate"!! I love this tool.

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