From 78f89f54d917ef7fa4cd652245c4c40b381e5fe3 Mon Sep 17 00:00:00 2001 From: xpk Date: Tue, 26 Mar 2024 15:31:28 +0800 Subject: [PATCH] UPD: adding secretsmanager arn to output --- .../security_identity_compliance/iam-group/versions.tf | 9 +++++++++ .../security_identity_compliance/iam-user/outputs.tf | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 modules/security_identity_compliance/iam-group/versions.tf diff --git a/modules/security_identity_compliance/iam-group/versions.tf b/modules/security_identity_compliance/iam-group/versions.tf new file mode 100644 index 0000000..e015cf1 --- /dev/null +++ b/modules/security_identity_compliance/iam-group/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.3.9" + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.0" + } + } +} \ No newline at end of file diff --git a/modules/security_identity_compliance/iam-user/outputs.tf b/modules/security_identity_compliance/iam-user/outputs.tf index ebc0c8a..6799e31 100644 --- a/modules/security_identity_compliance/iam-user/outputs.tf +++ b/modules/security_identity_compliance/iam-user/outputs.tf @@ -1,11 +1,15 @@ -output iam-user-name { +output "iam-user-name" { value = aws_iam_user.iam-user.name } -output iam-user-arn { +output "iam-user-arn" { value = aws_iam_user.iam-user.arn } -output iam-user-access-key { +output "iam-user-access-key" { value = try(aws_iam_access_key.iam-user-access-key[0].id, "none") } + +output "iam-user-secret-arn" { + value = try(aws_secretsmanager_secret_version.iam-user-secret[0].arn, "none") +} \ No newline at end of file