terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

Support for JSON data collection rule log_file format

Open doka380 opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

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_

doka380 avatar Jul 05 '24 15:07 doka380

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

cmeury avatar Aug 26 '24 13:08 cmeury