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