Skip to content

Commit 14a4c9d

Browse files
authored
feat: add support to configure monitoring for all buckets created by the solution if cloud_monitoring_provision is set to true (#87)
1 parent 366f469 commit 14a4c9d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

common-dev-assets

solutions/instances/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ locals {
2525
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
2626
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
2727

28+
metrics_monitoring = var.cloud_monitoring_provision ? {
29+
usage_metrics_enabled = true
30+
request_metrics_enabled = true
31+
metrics_monitoring_crn = module.observability_instance.cloud_monitoring_crn
32+
} : null
33+
2834
bucket_config_1 = var.existing_log_archive_cos_bucket_name == null && var.log_analysis_provision == true ? {
2935
class = var.log_archive_cos_bucket_class
3036
name = local.log_archive_cos_bucket_name
@@ -250,6 +256,7 @@ module "cos_bucket" {
250256
archive_rule = local.archive_rule
251257
expire_rule = local.expire_rule
252258
retention_rule = null
259+
metrics_monitoring = local.metrics_monitoring
253260
}
254261
]
255262
}

0 commit comments

Comments
 (0)