Manages a Table in a Log Analytics (formally Operational Insights) Workspace.
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_log_analytics_workspace" "example" {
name = "example"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "PerGB2018"
retention_in_days = 30
}
resource "azurerm_log_analytics_workspace_table" "example" {
workspace_id = azurerm_log_analytics_workspace.example.id
name = "AppMetrics"
retention_in_days = 60
total_retention_in_days = 180
}
The following arguments are supported:
name
- (Required) Specifies the name of a table in a Log Analytics Workspace.
workspace_id
- (Required) The object ID of the Log Analytics Workspace that contains the table.
plan
- (Optional) Specify the system how to handle and charge the logs ingested to the table. Possible values are Analytics
and Basic
. Defaults to Analytics
.
retention_in_days
- (Optional) The table's retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
total_retention_in_days
- (Optional) The table's total retention in days. Possible values range between 30 and 4383.
The following attributes are exported:
id
- The Log Analytics Workspace Table ID.
workspace_id
- The Workspace (or Customer) ID for the Log Analytics Workspace.
retention_in_days
- The table's data retention in days.
total_retention_in_days
- The table's total data retention in days.
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 minutes) Used when creating the Log Analytics Workspace.update
- (Defaults to 5 minutes) Used when updating the Log Analytics Workspace.read
- (Defaults to 5 minutes) Used when retrieving the Log Analytics Workspace.delete
- (Defaults to 30 minutes) Used when deleting the Log Analytics Workspace.