Skip to content

Commit

Permalink
refactored all the outputs prior to refactoring the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dms1981 committed Oct 14, 2024
1 parent d9277a0 commit e2c40c1
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions test/unit-test/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
output "bastion_security_group_1" {
description = "Security group of bastion"
value = module.bastion_linux[0].bastion_security_group
output "bastion_launch_template" {
description = "Bastion launch templates"
value = { for idx, bastion in module.bastion_linux : "bastion_${idx}" => bastion.bastion_launch_template }
}

output "bastion_launch_template_1" {
description = "Launch template of bastion"
value = module.bastion_linux[0].bastion_launch_template
output "bastion_s3_bucket" {
description = "Bastion S3 buckets"
value = { for idx, bastion in module.bastion_linux : "bastion_${idx}" => bastion.bastion_s3_bucket }
}

output "bastion_s3_bucket_1" {
description = "S3 bucket of bastion"
value = module.bastion_linux[0].bastion_s3_bucket
}

output "bastion_security_group_2" {
description = "Security group of bastion"
value = module.bastion_linux[1].bastion_security_group
}

output "bastion_launch_template_2" {
description = "Launch template of bastion"
value = module.bastion_linux[1].bastion_launch_template
}

output "bastion_s3_bucket_2" {
description = "S3 bucket of bastion"
value = module.bastion_linux[1].bastion_s3_bucket
output "bastion_security_group" {
description = "Bastion security groups"
value = { for idx, bastion in module.bastion_linux : "bastion_${idx}" => bastion.bastion_security_group }
}

output "bastion_kms_key" {
value = { for idx, bastion in module.bastion_linux : "bastion_${idx}" => bastion.bastion_kms_key }
description = "Bastion KMS keys"
value = { for idx, bastion in module.bastion_linux : "bastion_${idx}" => bastion.bastion_kms_key }
}

0 comments on commit e2c40c1

Please sign in to comment.