@@ -219,14 +219,14 @@ resource "aws_instance" "default" {
219
219
dynamic "ebs_block_device" {
220
220
for_each = var. ebs_block_device
221
221
content {
222
- delete_on_termination = lookup (ebs_block_device. value , " delete_on_termination" , null )
222
+ delete_on_termination = lookup (ebs_block_device. value , " delete_on_termination" , true )
223
223
device_name = ebs_block_device. value . device_name
224
- encrypted = lookup (ebs_block_device. value , " encrypted" , null )
224
+ encrypted = lookup (ebs_block_device. value , " encrypted" , true )
225
225
iops = lookup (ebs_block_device. value , " iops" , null )
226
- kms_key_id = var. kms_key_id == " " ? join (" " , aws_kms_key. default [* ]. arn ) : lookup (root_block_device . value , " kms_key_id" , null )
226
+ kms_key_id = var. kms_key_id == " " ? join (" " , aws_kms_key. default [* ]. arn ) : lookup (ebs_block_device . value , " kms_key_id" , null )
227
227
snapshot_id = lookup (ebs_block_device. value , " snapshot_id" , null )
228
228
volume_size = lookup (ebs_block_device. value , " volume_size" , null )
229
- volume_type = lookup (ebs_block_device. value , " volume_type" , null )
229
+ volume_type = lookup (ebs_block_device. value , " volume_type" , " gp2 " )
230
230
throughput = lookup (ebs_block_device. value , " throughput" , null )
231
231
tags = merge (module. labels . tags ,
232
232
{
0 commit comments