Skip to content

Commit 71860cb

Browse files
committed
chore: ec2 종료 시 디스크가 초기화 되지 않도록 수정
1 parent af91f4a commit 71860cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

infra/aws/terraform/ec2.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ resource "aws_instance" "ec2_1" {
110110

111111
# 루트 볼륨 설정
112112
root_block_device {
113-
volume_type = "gp2"
114-
volume_size = 30 # 볼륨 크기를 30GB로 설정
115-
encrypted = true
113+
volume_type = "gp2"
114+
volume_size = 30 # 볼륨 크기를 30GB로 설정
115+
encrypted = true
116+
delete_on_termination = false
116117
}
117118

118119
user_data = local.ec2_user_data

0 commit comments

Comments
 (0)