Skip to content

Commit

Permalink
fix- fixed typo for external ebs attachment block
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Jan 12, 2024
1 parent 7e21a41 commit c4cb617
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ resource "aws_instance" "default" {
dynamic "ebs_block_device" {
for_each = var.ebs_block_device
content {
delete_on_termination = lookup(ebs_block_device.value, "delete_on_termination", null)
delete_on_termination = lookup(ebs_block_device.value, "delete_on_termination", true)
device_name = ebs_block_device.value.device_name
encrypted = lookup(ebs_block_device.value, "encrypted", null)
encrypted = lookup(ebs_block_device.value, "encrypted", true)
iops = lookup(ebs_block_device.value, "iops", null)
kms_key_id = var.kms_key_id == "" ? join("", aws_kms_key.default[*].arn) : lookup(root_block_device.value, "kms_key_id", null)
kms_key_id = var.kms_key_id == "" ? join("", aws_kms_key.default[*].arn) : lookup(ebs_block_device.value, "kms_key_id", null)
snapshot_id = lookup(ebs_block_device.value, "snapshot_id", null)
volume_size = lookup(ebs_block_device.value, "volume_size", null)
volume_type = lookup(ebs_block_device.value, "volume_type", null)
volume_type = lookup(ebs_block_device.value, "volume_type", "gp2")
throughput = lookup(ebs_block_device.value, "throughput", null)
tags = merge(module.labels.tags,
{
Expand Down

0 comments on commit c4cb617

Please sign in to comment.