Skip to content

azurermApplicationInsightsWorkbook

Manages an Azure Workbook.

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 azurermApplicationInsightsWorkbookExample =
  new azurerm.applicationInsightsWorkbook.ApplicationInsightsWorkbook(
    this,
    "example_1",
    {
      data_json:
        '${jsonencode({\n    "version" = "Notebook/1.0",\n    "items" = [\n      {\n        "type" = 1,\n        "content" = {\n          "json" = "Test2022"\n        },\n        "name" = "text - 0"\n      }\n    ],\n    "isLocked" = false,\n    "fallbackResourceIds" = [\n      "Azure Monitor"\n    ]\n  })}',
      display_name: "workbook1",
      location: azurermResourceGroupExample.location,
      name: "85b3e8bb-fc93-40be-83f2-98f6bec18ba0",
      resource_group_name: azurermResourceGroupExample.name,
      tags: {
        ENV: "Test",
      },
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApplicationInsightsWorkbookExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created.

  • resourceGroupName - (Required) Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created.

  • location - (Required) Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created.

  • displayName - (Required) Specifies the user-defined name (display name) of the workbook.

  • dataJson - (Required) Configuration of this particular workbook. Configuration data is a string containing valid JSON.

  • sourceId - (Optional) Resource ID for a source resource. It should not contain any uppercase letters. Defaults to azureMonitor.

  • category - (Optional) Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: workbook, sentinel. Defaults to workbook.

  • description - (Optional) Specifies the description of the workbook.

  • identity - (Optional) An identity block as defined below. Changing this forces a new Workbook to be created.

  • storageContainerId - (Optional) Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created.

-> Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the azurermStorageContainer Data Source/Resource as resourceManagerId.

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

An identity block exports the following:

  • type - (Required) The type of Managed Service Identity that is configured on this Workbook. Possible values are userAssigned, systemAssigned and systemAssigned,UserAssigned. Changing this forces a new resource to be created.

  • principalId - The Principal ID of the System Assigned Managed Service Identity that is configured on this Workbook.

  • tenantId - The Tenant ID of the System Assigned Managed Service Identity that is configured on this Workbook.

  • identityIds - (Optional) The list of User Assigned Managed Identity IDs assigned to this Workbook. 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 Workbook.

Timeouts

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

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

Import

Workbooks can be imported using the resourceId, e.g.

terraform import azurerm_application_insights_workbook.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/workbooks/resource1