File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
solutions/fully-configurable Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ locals {
7272 target_ids = [module.activity_tracker.activity_tracker_targets[local.cloud_logs_target_name].id]
7373 }] : []
7474
75- apply_auth_policy = ( var. skip_cos_kms_auth_policy || ( length ( coalesce (local . buckets_config , [])) == 0 || ! var . kms_encryption_enabled_buckets )) ? 0 : 1
76- at_routes = concat (local. at_cos_route , local. at_cloud_logs_route )
75+ create_cross_account_auth_policy = ! var. skip_cos_kms_auth_policy && var . ibmcloud_kms_api_key != null ? 1 : 0
76+ at_routes = concat (local. at_cos_route , local. at_cloud_logs_route )
7777
7878}
7979
@@ -210,7 +210,7 @@ data "ibm_iam_account_settings" "iam_cos_account_settings" {
210210
211211# Create IAM Authorization Policy to allow COS to access KMS for the encryption key
212212resource "ibm_iam_authorization_policy" "policy" {
213- count = local. apply_auth_policy
213+ count = local. create_cross_account_auth_policy
214214 # Conditionals with providers aren't possible, using ibm.kms as provider incase cross account is enabled
215215 provider = ibm. kms
216216 source_service_account = data. ibm_iam_account_settings . iam_cos_account_settings . account_id
You can’t perform that action at this time.
0 commit comments