You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The auth policy is being created here instead of in COS module because of this limitation: https://github.com/terraform-ibm-modules/terraform-ibm-observability-da/issues/8
211
-
212
-
# Create IAM Authorization Policy to allow COS to access KMS for the encryption key
213
-
resource"ibm_iam_authorization_policy""policy" {
214
-
count=local.apply_auth_policy
215
-
# Conditionals with providers aren't possible, using ibm.kms as provider incase cross account is enabled
description="Allow the COS instance ${local.cos_instance_guid} to read the ${local.kms_service} key ${local.cos_kms_key_id} from the instance ${local.existing_kms_guid}"
222
-
resource_attributes {
223
-
name="serviceName"
224
-
operator="stringEquals"
225
-
value=local.kms_service
226
-
}
227
-
resource_attributes {
228
-
name="accountId"
229
-
operator="stringEquals"
230
-
value=local.kms_account_id
231
-
}
232
-
resource_attributes {
233
-
name="serviceInstance"
234
-
operator="stringEquals"
235
-
value=local.existing_kms_guid
236
-
}
237
-
resource_attributes {
238
-
name="resourceType"
239
-
operator="stringEquals"
240
-
value="key"
241
-
}
242
-
resource_attributes {
243
-
name="resource"
244
-
operator="stringEquals"
245
-
value=local.cos_kms_key_id
246
-
}
247
-
# Scope of policy now includes the key, so ensure to create new policy before
248
-
# destroying old one to prevent any disruption to every day services.
0 commit comments