@@ -27,12 +27,6 @@ locals {
2727 cos_target_bucket_name = var. existing_at_cos_target_bucket_name != null ? var. existing_at_cos_target_bucket_name : module. cos_bucket [0 ]. buckets [local . at_cos_target_bucket_name ]. bucket_name
2828 cos_target_bucket_endpoint = var. existing_at_cos_target_bucket_endpoint != null ? var. existing_at_cos_target_bucket_endpoint : module. cos_bucket [0 ]. buckets [local . at_cos_target_bucket_name ]. s3_endpoint_private
2929
30- metrics_monitoring = var. cloud_monitoring_provision || (var. existing_cloud_monitoring_crn != null ) ? {
31- usage_metrics_enabled = true
32- request_metrics_enabled = true
33- metrics_monitoring_crn = var.cloud_monitoring_provision ? module.observability_instance.cloud_monitoring_crn : var.existing_cloud_monitoring_crn
34- } : null
35-
3630 bucket_config_1 = var. existing_log_archive_cos_bucket_name == null && var. log_analysis_provision == true ? {
3731 class = var.log_archive_cos_bucket_class
3832 name = local.log_archive_cos_bucket_name
@@ -238,7 +232,7 @@ module "cos_bucket" {
238232 }
239233 count = (length (coalesce (local. bucket_config_map , [])) != 0 ) ? 1 : 0 # no need to call COS module if consumer is using existing COS bucket
240234 source = " terraform-ibm-modules/cos/ibm//modules/buckets"
241- version = " 8.5.3 "
235+ version = " 8.6.2 "
242236 bucket_configs = [
243237 for value in local . bucket_config_map :
244238 {
@@ -257,7 +251,17 @@ module "cos_bucket" {
257251 archive_rule = local.archive_rule
258252 expire_rule = local.expire_rule
259253 retention_rule = null
260- metrics_monitoring = local.metrics_monitoring
254+ metrics_monitoring = {
255+ usage_metrics_enabled = true
256+ request_metrics_enabled = true
257+ # if DA is creating monitoring instance, use that. If its passing existing instance, use that. If neither, pass null, meaning metrics are sent to the instance associated to the container's location unless otherwise specified in the Metrics Router service configuration.
258+ metrics_monitoring_crn = var.cloud_monitoring_provision ? module.observability_instance.cloud_monitoring_crn : var.existing_cloud_monitoring_crn != null ? var.existing_cloud_monitoring_crn : null
259+ }
260+ activity_tracking = {
261+ read_data_events = true
262+ write_data_events = true
263+ management_events = true
264+ }
261265 }
262266 ]
263267}
0 commit comments