Skip to content

azurermMonitorDataCollectionEndpoint

Manages a Data Collection Endpoint.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-rg",
  }
);
const azurermMonitorDataCollectionEndpointExample =
  new azurerm.monitorDataCollectionEndpoint.MonitorDataCollectionEndpoint(
    this,
    "example_2",
    {
      description: "monitor_data_collection_endpoint example",
      kind: "Windows",
      location: azurermResourceGroupExample.location,
      name: "example-mdce",
      public_network_access_enabled: true,
      resource_group_name: azurermResourceGroupExample.name,
      tags: {
        foo: "bar",
      },
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMonitorDataCollectionEndpointExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • location - (Required) The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created.

  • name - (Required) The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created.


  • description - (Optional) Specifies a description for the Data Collection Endpoint.

  • kind - (Optional) The kind of the Data Collection Endpoint. Possible values are linux and windows.

  • publicNetworkAccessEnabled - (Optional) Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are true and false. Default to true.

  • tags - (Optional) A mapping of tags which should be assigned to the Data Collection Endpoint.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Data Collection Endpoint.

  • configurationAccessEndpoint - The endpoint used for accessing configuration, e.g., https://mydceAbcdEastus1ControlMonitorAzureCom.

  • logsIngestionEndpoint - The endpoint used for ingesting logs, e.g., https://mydceAbcdEastus1IngestMonitorAzureCom.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Data Collection Endpoint.
  • read - (Defaults to 5 minutes) Used when retrieving the Data Collection Endpoint.
  • update - (Defaults to 30 minutes) Used when updating the Data Collection Endpoint.
  • delete - (Defaults to 30 minutes) Used when deleting the Data Collection Endpoint.

Import

Data Collection Endpoints can be imported using the resourceId, e.g.

terraform import azurerm_monitor_data_collection_endpoint.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1