From b570d7995efa9b542d5cdbe9ae30dea29f23cfcc Mon Sep 17 00:00:00 2001 From: morre Date: Sun, 29 Oct 2023 15:09:38 +0100 Subject: [PATCH] fix: only use OIDC provider ARN when OIDC provider is created (#40) This fixes #39. --- outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 1b51818..acff5a3 100644 --- a/outputs.tf +++ b/outputs.tf @@ -27,5 +27,5 @@ output "iam_role_name" { output "oidc_provider_arn" { depends_on = [aws_iam_openid_connect_provider.github] description = "ARN of the OIDC provider." - value = var.enabled ? aws_iam_openid_connect_provider.github[0].arn : "" + value = var.enabled && var.create_oidc_provider ? aws_iam_openid_connect_provider.github[0].arn : "" }