-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_instance should allow to specify the instance state #190
Comments
I would really appreciate to have this feature. |
+EleventyBillion |
I will add another use case for this feature. I often use bastion instance in projects, and like other aws resources, this instance is managed by terraform. Most of the time, the bastion is stopped, and I would appreciate to be able to specify this behavior in terraform script. |
+1 |
+1 |
+1 I would love to see this. I have teradici pcoip graphical instances that serve as backup gateways should my vpn not be working. They are expensive to forget about if left running, but super useful to have on standby. |
I would also like it, for if I stand up an instance to create an AMI from; you don't need (or want) it up after the AMI is created. |
Merging this with #22 as this is a duplicate. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @FlorinAndrei as hashicorp/terraform#7262. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.6.16
Affected Resource(s)
There seems to be no way to specify the instance state in a template. I would like to be able to do something like this:
The default value for state should be "running".
Use case: Terraform is great for creating / destroying test or development environments quickly (semi-temporary environments). But sometimes creating an environment may include a long initial step, like importing a DB from backups. If that's the case, I don't want to create the environment every morning, wait for DB to be imported, and then destroy it in the evening.
Instead, I want to create the environment today, in the morning, and wait for the DB import once. Then, at the end of the day, turn off all instances and go home. That could be accomplished by specifying the state for all instances in a global variable, and changing that variable from "running" to "stopped", then run terraform apply.
Then the next morning I'll just change the state back to "running", run terraform apply and have the environment up and running very quickly. The initial DB import would not have to be performed again every day. This would save a lot of time in such cases.
The text was updated successfully, but these errors were encountered: