claranet / terraform-azurerm-diagnostic-settings

Fork of the `terraform-azurerm-diagnostic-settings` module with Claranet's contributions and improvements.
Apache License 2.0
2 stars 10 forks source link

[FEAT] category_group addition #3

Open nimblenitin opened 1 year ago

nimblenitin commented 1 year ago

Community Note

Description

category_group can be added to allow user to add category group instead of category as below

dynamic "enabled_log" {
    for_each = local.log_categories

content {
     category_group = var.category_group
     category = var.category_group != null ? null : enabled_log.value

      retention_policy {
        enabled = var.retention_days != null
        days    = var.retention_days
      }
    }
  }

instead of

dynamic "enabled_log" {
    for_each = local.log_categories

    content {
      category = enabled_log.value

      retention_policy {
        enabled = var.retention_days != null
        days    = var.retention_days
      }
    }
  }

New or Affected Resource(s)/Data Source(s)

azurerm_monitor_diagnostic_setting

Potential Terraform Configuration

dynamic "enabled_log" {
    for_each = local.log_categories

content {
     category_group = var.category_group
     category = var.category_group != null ? null : enabled_log.value

      retention_policy {
        enabled = var.retention_days != null
        days    = var.retention_days
      }
    }
  }

References

No response

BzSpi commented 1 year ago

Hello @nimblenitin

Thank you for opening this issue. We have this enhancement in our roadmap but implementation is a bit more complex than it seems. We will implement it but we do not have any estimate regarding the ETA.

Stay tuned :)