Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
EC2 instance with EBS root volume destroyed & recreated on each apply #2905
I am seeing the below issue on Terraform v0.11.1. I understand that there are a number of previous issues in this area, but I have not been able to get past this by looking at the suggestions there.
I am using the following AMI:
My terraform configuration for this resource looks like this:
I added the
referenced this issue
Jan 9, 2018
(With account specific stuff redacted).
This is absolutely consistently reproducible. My workaround right now is to put the recreated stuff in a separate file and just rename it to a non-.tf and remove it from the tfstate unless I want to make changes.
Hi, I'm seeing this behaviour, I've added the vpc_security_group_ids and this has removed one of the restores. I've played around a bit and notice that the root_block_device forces a restore if the size changes and the ebs_block_device is always requesting a new resource regardless of change.
Started with no root_block_device but added just to see behaviour and other posts saying you need to specify.
My config looks like this for the ebs;
any suggestion please or is this actually a bug?
I'm also seeing this. I've configured the creation of an ebs_block_device:
But what shows up in terraform.tfstate is a root_block_device:
Is this a mismatch between what terraform thinks it's updating the state to be and what state actually gets supplied by
If you are trying to reference the root EBS block device (e.g. device name listed as the
If you are trying to create a second EBS block device, separate from the root EBS block device, it needs to have a device name that is different than the root EBS block device name.
If you are trying to resize the root EBS block device without recreation, that issue can be tracked here: #768.