-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
EC2 instance is detroyed and created on every apply #15679
Comments
Hi @bryanheo Sorry you're having trouble with this configuration. Can you show the output of the |
Hi @jbardin Thank you for your help
|
This is what's causing your resource to create again. With gp2 you can't set a custom iops value afaik. You need to use IO1 instead so
becomes
|
Thank you for your help |
i am also facing the following same type of issue but above solution donot solve my issue . resource "aws_instance" "lms-ec2-apache" { security_groups =["${aws_security_group.lms-ec2-apache.id}"] terraform plan gives: Terraform will perform the following actions: module.ec2-apache.aws_instance.lms-ec2-apache must be replaced
Do you want to perform these actions? Enter a value: no Apply cancelled. anyone please help me asap |
i am also facing the following same type of issue but above solution donot solve my issue . resource "aws_instance" "lms-ec2-apache" { security_groups =["${aws_security_group.lms-ec2-apache.id}"] terraform plan gives: Terraform will perform the following actions: module.ec2-apache.aws_instance.lms-ec2-apache must be replaced-/+ resource "aws_instance" "lms-ec2-apache" {
Plan: 1 to add, 0 to change, 1 to destroy. anyone please help asap . |
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. |
PROVIDER ISSUES
EC2 instance is detroyed and created on every apply. Please see the source below
As suggested on #7221, I am using vpc_security_group_ids rather than security_groups but it still destroy and create the EC2 instance on every apply
PLEASE NOTE: Terraform has split out the builtin Providers into their own repositories. For any Provider issues, please open all issues and pull requests in the corresponding repository. An index of supported Providers can be found here:
All other issues (that appear to affect multiple or all providers) may be an issue with Terraform's core, and should be opened here.
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.$ terraform -v
Terraform v0.9.11
Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
What should have happened?
EC3 dose not need to be destroyed and created on every apply
Actual Behavior
What actually happened?
EC2 instance detroyed and created on every apply
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
-ec2 instance detroyed and created on every apply #7221
-EC2 instances with EBS volumes destroyed & recreated on each apply #5006
The text was updated successfully, but these errors were encountered: