mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 07:01:56 +03:00
skip destroy for volume attachment
This commit is contained in:
+4
-3
@@ -25,8 +25,9 @@ resource "aws_ebs_volume" "ebs-volume-1" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_volume_attachment" "ebs-volume-1-attachment" {
|
resource "aws_volume_attachment" "ebs-volume-1-attachment" {
|
||||||
device_name = var.INSTANCE_DEVICE_NAME
|
device_name = var.INSTANCE_DEVICE_NAME
|
||||||
volume_id = aws_ebs_volume.ebs-volume-1.id
|
volume_id = aws_ebs_volume.ebs-volume-1.id
|
||||||
instance_id = aws_instance.example.id
|
instance_id = aws_instance.example.id
|
||||||
|
skip_destroy = true # skip destroy to avoid issues with terraform destroy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user