terraform-ibm-modules / terraform-ibm-cos

Configures an IBM Cloud Object Storage instance and bucket
Apache License 2.0
7 stars 24 forks source link

Some AT and metrics values being passed by the COS buckets submodule are being ignored #648

Closed ocofaigh closed 3 weeks ago

ocofaigh commented 3 months ago

In https://github.com/terraform-ibm-modules/terraform-ibm-cos/blob/main/modules/buckets/variables.tf the bucket_configs variable has the following section:

activity_tracking = optional(object({
      read_data_events     = optional(bool, true)
      write_data_events    = optional(bool, true)
      activity_tracker_crn = optional(string, null)
    }))

However the root level module does not allow you to set the values for read_data_events or write_data_events - they are hard coded to true so whatever value is passed via the bucket_configs variable is actually ignored when bucket is getting created.

2 options:

  1. Expose read_data_events and write_data_events in the root level module and allow the bucket submodule to set them
  2. Remove them from the bucket_configs variable.

Same issue goes for metrics_monitoring:

metrics_monitoring = optional(object({
      usage_metrics_enabled   = optional(bool, true)
      request_metrics_enabled = optional(bool, true)
      metrics_monitoring_crn  = optional(string, null)
    }))
ocofaigh commented 3 months ago

Draft PR (still waiting on 1.67.0 to be released): https://github.com/terraform-ibm-modules/terraform-ibm-cos/pull/660