FIX: correcting hard-coded test secret name

This commit is contained in:
xpk 2023-06-13 15:47:05 +08:00
parent abf60a0972
commit c53a27ee5f
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86
3 changed files with 8 additions and 1 deletions

View File

@ -5,7 +5,7 @@ resource "random_id" "rid" {
} }
resource "aws_secretsmanager_secret" "secret1" { resource "aws_secretsmanager_secret" "secret1" {
name = "test-secret-${random_id.rid.dec}" name = "${var.secret_name}-${random_id.rid.dec}"
description = var.secret_description description = var.secret_description
} }

View File

@ -0,0 +1,6 @@
output secret_arn {
value = aws_secretsmanager_secret.secret1.arn
}
output secret_id {
value = "${var.secret_name}-${random_id.rid.dec}"
}

View File

@ -1,4 +1,5 @@
variable "secret_description" {} variable "secret_description" {}
variable "secret_name" {}
variable "secret_value" {} variable "secret_value" {}
variable "secret_policy" { variable "secret_policy" {
type = string type = string