Skip to content

Commit

Permalink
Fix- Fixed typo for external EBS attachment block. (#64)
Browse files Browse the repository at this point in the history
* fix- fixed typo for external ebs attachment block

* fix- fixed tflints

---------

Co-authored-by: Anmol Nagpal <[email protected]>
  • Loading branch information
nileshgadgi and anmolnagpal authored Jan 12, 2024
1 parent 7e21a41 commit 31ab62b
Show file tree
Hide file tree
Showing 2 changed files with 8 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
4 changes: 4 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ terraform {
source = "hashicorp/aws"
version = ">= 5.13.1"
}
tls = {
source = "hashicorp/tls"
version = ">= 4.0"
}
}
}

0 comments on commit 31ab62b

Please sign in to comment.