UPD: adding secretsmanager arn to output

This commit is contained in:
xpk 2024-03-26 15:31:28 +08:00
parent c274ca58c5
commit 78f89f54d9
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86
2 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.3.9"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}

View File

@ -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")
}