azurermLogAnalyticsStorageInsights
Manages a Log Analytics Storage Insights resource.
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 azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
this,
"example_1",
{
account_replication_type: "LRS",
account_tier: "Standard",
location: azurermResourceGroupExample.location,
name: "examplestoracc",
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.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermLogAnalyticsWorkspaceExample =
new azurerm.logAnalyticsWorkspace.LogAnalyticsWorkspace(this, "example_2", {
location: azurermResourceGroupExample.location,
name: "exampleworkspace",
resource_group_name: azurermResourceGroupExample.name,
retention_in_days: 30,
sku: "PerGB2018",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLogAnalyticsWorkspaceExample.overrideLogicalId("example");
const azurermLogAnalyticsStorageInsightsExample =
new azurerm.logAnalyticsStorageInsights.LogAnalyticsStorageInsights(
this,
"example_3",
{
name: "example-storageinsightconfig",
resource_group_name: azurermResourceGroupExample.name,
storage_account_id: azurermStorageAccountExample.id,
storage_account_key: azurermStorageAccountExample.primaryAccessKey,
workspace_id: azurermLogAnalyticsWorkspaceExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLogAnalyticsStorageInsightsExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created. -
resourceGroupName
- (Required) The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created. -
workspaceId
- (Required) The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created. -
storageAccountId
- (Required) The ID of the Storage Account used by this Log Analytics Storage Insights. -
storageAccountKey
- (Required) The storage access key to be used to connect to the storage account. -
blobContainerNames
- (Optional) The names of the blob containers that the workspace should read. -
tableNames
- (Optional) The names of the Azure tables that the workspace should read.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Log Analytics Storage Insights.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Log Analytics Storage Insights.read
- (Defaults to 5 minutes) Used when retrieving the Log Analytics Storage Insights.update
- (Defaults to 30 minutes) Used when updating the Log Analytics Storage Insights.delete
- (Defaults to 30 minutes) Used when deleting the Log Analytics Storage Insights.
Import
Log Analytics Storage Insight Configs can be imported using the resourceId
, e.g.