From c11b537dc4e92920dbea90957366793d4424e0a4 Mon Sep 17 00:00:00 2001 From: Soaib024 <33781996+Soaib024@users.noreply.github.com> Date: Tue, 27 Aug 2024 21:51:56 +0530 Subject: [PATCH] fix: only create the secrets manager auth policy if user passes a value for `existing_secrets_manager_instance_crn` regardless of the value of `skip_cos_sm_auth_policy` (#709) --- solutions/instance/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/instance/main.tf b/solutions/instance/main.tf index c59581bc..f2632a97 100644 --- a/solutions/instance/main.tf +++ b/solutions/instance/main.tf @@ -17,7 +17,7 @@ module "cos" { } resource "ibm_iam_authorization_policy" "secrets_manager_key_manager" { - count = var.skip_cos_sm_auth_policy ? 0 : 1 + count = var.skip_cos_sm_auth_policy || var.existing_secrets_manager_instance_crn == null ? 0 : 1 depends_on = [module.cos] source_service_name = "secrets-manager" source_resource_instance_id = local.existing_secrets_manager_instance_guid