Skip to content

Commit

Permalink
fix: Fixed outputs for Block Devices (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim1e097cd authored Jul 6, 2023
1 parent d64e6b1 commit 80381d2
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,30 @@ output "iam_instance_profile_unique" {
################################################################################
output "root_block_device" {
description = "Root block device information"
value = try(aws_instance.this[0].root_block_device, null)
value = try(
aws_instance.this[0].root_block_device,
aws_instance.ignore_ami[0].root_block_device,
aws_spot_instance_request.this[0].root_block_device,
null
)
}

output "ebs_block_device" {
description = "EBS block device information"
value = try(aws_instance.this[0].ebs_block_device, null)
value = try(
aws_instance.this[0].ebs_block_device,
aws_instance.ignore_ami[0].ebs_block_device,
aws_spot_instance_request.this[0].ebs_block_device,
null
)
}

output "ephemeral_block_device" {
description = "Ephemeral block device information"
value = try(aws_instance.this[0].ephemeral_block_device, null)
value = try(
aws_instance.this[0].ephemeral_block_device,
aws_instance.ignore_ami[0].ephemeral_block_device,
aws_spot_instance_request.this[0].ephemeral_block_device,
null
)
}

0 comments on commit 80381d2

Please sign in to comment.