terraform-provider-aws
terraform-provider-aws copied to clipboard
[Bug]: delete_on_termination in ebs_block_device block in aws_instance doesn't do anything
trafficstars
Terraform Core Version
1.3.9
AWS Provider Version
4.55.0
Affected Resource(s)
- aws_instance
Expected Behavior
Toggle the delete on termination flag on the ebs volume
Actual Behavior
No changes are detected after toggling delete_on_termination value
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
resource "aws_instance" "mysql" {
ami = var.ubuntu22lts-ami
instance_type = "t3a.small"
ebs_block_device {
delete_on_termination = true
device_name = "/dev/sdf"
volume_size = 8
volume_type = "gp3"
}
}
or
resource "aws_instance" "mysql" {
ami = var.ubuntu22lts-ami
instance_type = "t3a.small"
ebs_block_device {
delete_on_termination = false
device_name = "/dev/sdf"
volume_size = 8
volume_type = "gp3"
}
}
Steps to Reproduce
Try changing delete_on_termination in the ebs_block_device block, and run terraform plan. You should see a change with changing the value in AWS, but no matter the option, it detects no changes.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
- https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-attribute.html
Would you like to implement a fix?
None
Community Note
Voting for Prioritization
- Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
- Please see our prioritization guide for information on how we prioritize.
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
- If you are interested in working on this issue, please leave a comment.
- If this would be your first contribution, please review the contribution guide.