hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.65k forks source link

Support for JSON data collection rule log_file format #26554

Open doka380 opened 4 months ago

doka380 commented 4 months ago

Is there an existing issue for this?

Community Note

Description

The current documentation says the only possible format for log_file is "text". If there are no other ways to collect JSON log files except specifying "json" format (which is supported by ARM template), can this be added?

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

azurerm_monitor_data_collection_rule

Potential Terraform Configuration

resource "azurerm_monitor_data_collection_rule" "example" {
  name                        = "example-rule"
  [ ... ]

  data_sources {
    log_file {
      name          = "example-datasource-jsonlogfile"
      format        = "json"
      streams       = ["Custom-MyTableJsonData"]
      file_patterns = ["/var/log/jsonlog.log"]
    }


### References

_No response_
cmeury commented 2 months ago

go-azure-sdk unfortunately only supports "text" as well, so that probably needs an update?