# Issue with "azurerm monitor data collection rule"

**URL:** <https://discuss.hashicorp.com/t/issue-with-azurerm-monitor-data-collection-rule/49589>\
**Category:** Terraform\
**Tags:** azure\
**Created:** [February 1, 2023, 12:21pm UTC](https://discuss.hashicorp.com/t/issue-with-azurerm-monitor-data-collection-rule/49589 "2023-02-01T12:21:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cRaZy-T](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/crazy-t/32/16852_2.png) [@cRaZy-T](https://discuss.hashicorp.com/u/cRaZy-T)\
**Post date:** [February 1, 2023, 12:21pm UTC](https://discuss.hashicorp.com/t/issue-with-azurerm-monitor-data-collection-rule/49589/1 "2023-02-01T12:21:59Z")

</div>

Hi,

I have some problems setting up the “azurerm\_monitor\_data\_collection\_rule” resource, maybe someone can give me a tip where my mistake is.

Terrafrom Version: 1.3.7  
azurerm: 3.41.0

The rule is created but nothing is selected in the “Performance Counters” and in “Syslog” all the “Facilities” are available but no “minimum log level”.

My code looks like this:

```auto
resource "azurerm_monitor_data_collection_rule" "data_collection_rule" {
  name = "${var.project}-${var.environment}-log-rules"
  resource_group_name = lower("devops-${var.environment}-log-rg")
  location = var.location

  destinations {
    log_analytics {
      workspace_resource_id = var.workspace_id
      name = "${var.project}-${var.environment}-destination-log"
    }
  }

  data_flow {
    streams = ["Microsoft-Perf","Microsoft-Syslog"]
    destinations = ["${var.project}-${var.environment}-destination-log"]
  }

  data_sources {
    syslog {
      facility_names = ["*"]
      log_levels = ["*"]
      name = "${var.project}-${var.environment}-sysLogs"
    }

    performance_counter {
      streams = ["Microsoft-Perf"]
      sampling_frequency_in_seconds = 10
      counter_specifiers = ["*"]
      name = "${var.project}-${var.environment}-perfCounter"
    }
  }
}

```

Does anyone have an idea where my mistake is?

Regards  
Thorsten
