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

aws: store and read instance state #3261

Merged
merged 1 commit into from
Jan 12, 2016
Merged

aws: store and read instance state #3261

merged 1 commit into from
Jan 12, 2016

Conversation

fatih
Copy link
Contributor

@fatih fatih commented Sep 17, 2015

This allows us to store the instance state into the state file. This
means we can now easily see the instance state with terraform show.

An example terraform show result:

image

This allows us to store the instance state into the state file. This
means we can now easily see the instance state with `terraform show`.
@radeksimko
Copy link
Member

What do you think of making this field (with some extra logic) not just Computed, but also Optional? The default option would be running and other possible option stopped, which can solve #1579 😉

@stack72
Copy link
Contributor

stack72 commented Sep 19, 2015

I love that idea - we have 1 or 2 instance resources that when i rerun TF, they create running instances. I'd love to be able to mark them as stopped :)

@fatih
Copy link
Contributor Author

fatih commented Sep 30, 2015

Hi @radeksimko

This sounds good. I'm curious about how the flow should be. Assume I have a tf file which creates two aws instances of type t2.micro. They are in running state. I'll stop them manually, which means they are in stopping state.

Now if I run terraform apply, it reads the state file, (probably also refresh the resources) and start them again, so the final state of the instances are again running? Is this correct?

@radeksimko
Copy link
Member

@fatih Yes, the described flow is exactly how I think it should work. Expected state by default should be running.

EC2.StopInstances and EC2.StartInstances may be useful.

@fatih
Copy link
Contributor Author

fatih commented Sep 30, 2015

Thanks for the clarification @radeksimko. I'll work on the rest and update the PR. I'll ping again once I'm ready.

@catsby catsby added the waiting-response An issue/pull request is waiting for a response from the community label Oct 28, 2015
@catsby
Copy link
Contributor

catsby commented Dec 9, 2015

Hey all – is this still a work in progress, or shall we close it?

@fatih
Copy link
Contributor Author

fatih commented Dec 9, 2015

@catsby unfortunately I don't have time to tackle the idea of @radeksimko beyond this current PR. Feel free to close, or merge and work on a different PR if you wish.

@catsby
Copy link
Contributor

catsby commented Dec 9, 2015

Thanks for the update @fatih ! We'll review and see if it's something we can pick up on. Appreciate what you've done so far 😄

@catsby catsby removed the waiting-response An issue/pull request is waiting for a response from the community label Dec 9, 2015
@catsby
Copy link
Contributor

catsby commented Jan 12, 2016

Going to merge as is, thank you!

catsby added a commit that referenced this pull request Jan 12, 2016
aws: store and read instance state
@catsby catsby merged commit 4f8e971 into hashicorp:master Jan 12, 2016
@ghost
Copy link

ghost commented Apr 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants