From 498e46ba5460b38adfb4cc948e6bca404555666a Mon Sep 17 00:00:00 2001 From: David Sibley Date: Tue, 22 Oct 2024 12:27:01 +0100 Subject: [PATCH 1/2] reinstated original behaviour of security group output, and moved new functionality to separate output --- outputs.tf | 5 +++++ test/unit-test/outputs.tf | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 3b18dbe..5b70613 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,5 +1,10 @@ output "bastion_security_group" { description = "Security group of bastion" + value = aws_security_group.bastion_linux.id +} + +output "bastion_security_group_map" { + description = "Security group details of bastion" value = aws_security_group.bastion_linux } diff --git a/test/unit-test/outputs.tf b/test/unit-test/outputs.tf index 2c5bbd8..5050407 100644 --- a/test/unit-test/outputs.tf +++ b/test/unit-test/outputs.tf @@ -10,7 +10,7 @@ output "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.id } + value = { for idx, bastion in module.bastion_linux : "bastion_${idx}" => bastion.bastion_security_group_map.id } } output "bastion_kms_key" { From d24e7f7ecf3957509e2062f1287229bd0edf56eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Oct 2024 11:31:28 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8ff2c31..b26d898 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ In order to prevent older versions from being retained forever, in addition to t | [bastion\_launch\_template](#output\_bastion\_launch\_template) | Launch template of bastion | | [bastion\_s3\_bucket](#output\_bastion\_s3\_bucket) | S3 bucket of bastion | | [bastion\_security\_group](#output\_bastion\_security\_group) | Security group of bastion | +| [bastion\_security\_group\_map](#output\_bastion\_security\_group\_map) | Security group details of bastion | [Standards Link]: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/public-report/modernisation-platform-terraform-bastion-linux "Repo standards badge."