This repository was archived by the owner on Sep 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Add a new state_mv method #13
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
91bc52c
Add a new rename method
karajan1001 9e6c4c4
Better tests
karajan1001 f632c06
Update tpi/terraform.py
karajan1001 0977ce2
Update tpi/terraform.py
karajan1001 05bbe7b
Update tpi/terraform.py
karajan1001 72a5e53
Update tpi/terraform.py
karajan1001 5b13c67
Rename the function to state_mv
karajan1001 8e9e134
Remove unused file contents
karajan1001 22abec2
Double timeout
karajan1001 9a0fc83
Apply suggestions from code review
karajan1001 59510c5
Update tpi/terraform.py
karajan1001 19abda5
Rebase to master
karajan1001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,3 +131,10 @@ def _shell_default( | |
| port = f":{port}" if port is not None else "" | ||
| cmd.append(f"{user}{host}{port}") | ||
| run(cmd) | ||
|
|
||
| def state_mv(self, source, destination, **kwargs): | ||
| """Retain an existing remote object but track it as a | ||
| different resource instance address. | ||
| """ | ||
| assert source and destination | ||
| self.tf.cmd("state mv", source, destination) | ||
|
Comment on lines
+134
to
+140
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll still need the wrapper for |
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.