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

Support atlantis state rm subcommand #273

Closed
majormoses opened this issue Sep 13, 2018 · 5 comments · Fixed by #2880
Closed

Support atlantis state rm subcommand #273

majormoses opened this issue Sep 13, 2018 · 5 comments · Fixed by #2880
Labels
feature New functionality/enhancement

Comments

@majormoses
Copy link
Contributor

majormoses commented Sep 13, 2018

In some cases (such as someone deleted a resource outside of the context of terraform) you need to be able to run a terraform state rm $RESOURCE command to resolve it. Another use case would be renaming a resource without performing a destroy/create would require terraform state mv $OLD_RESOURCE $NEW_RESOURCE.

@lkysow lkysow added the feature New functionality/enhancement label Apr 4, 2019
@natalysheinin
Copy link

+1

1 similar comment
@kiqdestro
Copy link

+1

@minamijoyo
Copy link
Contributor

Hi folks who want to run terraform state mv/rm/import commands in Atlantis,
I posted an example for how to integrate tfmigrate into Atlantis: #1927
Have a try!

@nitrocode
Copy link
Member

It should be straight forward to expose the state command here in the parser function

switch cmd {
case command.Plan.String():

@nitrocode nitrocode changed the title Atlantis should be able to run the terraform state sub commands Support atlantis state subcommand Oct 20, 2022
jamengual pushed a commit that referenced this issue Nov 24, 2022
* wip

* fix typo

* Address comments

* Add logs

* Update server/events/output_updater.go

Co-authored-by: Nish Krishnan <[email protected]>

Co-authored-by: Nish Krishnan <[email protected]>
@nitrocode nitrocode changed the title Support atlantis state subcommand Support atlantis state rm subcommand Jan 19, 2023
@nitrocode
Copy link
Member

The state rm command is now supported in the dev tag of the atlantis image. Please give it a try and let us know if you see any bugs.

The state mv tag was not added due to the new moved blocks available in terraform

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

Successfully merging a pull request may close this issue.

6 participants