From df7344b373009f80e72d803e882568cee9eab217 Mon Sep 17 00:00:00 2001 From: githubjianli <51385385+githubjianli@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:47:44 -0800 Subject: [PATCH] test --- common.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common.tf b/common.tf index 829107e..3087ac8 100644 --- a/common.tf +++ b/common.tf @@ -51,17 +51,17 @@ data "aws_iam_policy_document" "waggle_dance_glue_policy" { data "aws_secretsmanager_secret" "datadog_key" { - count = length(data.aws_secretsmanager_secret.datadog_key) > 0 ? 1 : 0 + count = length(var.datadog_key_secret_name) > 0 ? 1 : 0 name = var.datadog_key_secret_name } data "aws_secretsmanager_secret_version" "datadog_key" { - count = length(data.aws_secretsmanager_secret.datadog_key) > 0 ? 1 : 0 + count = length(var.datadog_key_secret_name) > 0 ? 1 : 0 secret_id = data.aws_secretsmanager_secret.datadog_key[0].id } locals { - datadog_keys = length(data.aws_secretsmanager_secret.datadog_key) > 0 ? {} : jsondecode(data.aws_secretsmanager_secret_version.datadog_key[0].secret_string) + datadog_keys = length(var.var.datadog_key_secret_name) > 0 ? {} : jsondecode(data.aws_secretsmanager_secret_version.datadog_key[0].secret_string) } provider "datadog" {