Skip to content

azurermMonitorPrivateLinkScopedService

Manages an Azure Monitor Private Link Scoped Service.

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.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermApplicationInsightsExample =
  new azurerm.applicationInsights.ApplicationInsights(this, "example_1", {
    application_type: "web",
    location: azurermResourceGroupExample.location,
    name: "example-appinsights",
    resource_group_name: azurermResourceGroupExample.name,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApplicationInsightsExample.overrideLogicalId("example");
const azurermMonitorPrivateLinkScopeExample =
  new azurerm.monitorPrivateLinkScope.MonitorPrivateLinkScope(
    this,
    "example_2",
    {
      name: "example-ampls",
      resource_group_name: azurermResourceGroupExample.name,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMonitorPrivateLinkScopeExample.overrideLogicalId("example");
const azurermMonitorPrivateLinkScopedServiceExample =
  new azurerm.monitorPrivateLinkScopedService.MonitorPrivateLinkScopedService(
    this,
    "example_3",
    {
      linked_resource_id: azurermApplicationInsightsExample.id,
      name: "example-amplsservice",
      resource_group_name: azurermResourceGroupExample.name,
      scope_name: azurermMonitorPrivateLinkScopeExample.name,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMonitorPrivateLinkScopedServiceExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created.

  • scopeName - (Required) The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created.

  • linkedResourceId - (Required) The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created.

Attributes Reference

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

  • id - The ID of the Azure Monitor Private Link Scoped Service.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Azure Monitor Private Link Scope.
  • read - (Defaults to 5 minutes) Used when retrieving the Azure Monitor Private Link Scope.
  • delete - (Defaults to 30 minutes) Used when deleting the Azure Monitor Private Link Scope.
  • update - (Defaults to 30 minutes) Used when updating the Monitor Private Link Scoped Service.

Import

Azure Monitor Private Link Scoped Services can be imported using the resourceId, e.g.

terraform import azurerm_monitor_private_link_scoped_service.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/privateLinkScopes/pls1/scopedResources/sr1