Complete the code to create a Log Analytics workspace with a specified name.
resource "azurerm_log_analytics_workspace" "example" { name = [1] location = "eastus" resource_group_name = "example-resources" sku = "PerGB2018" retention_in_days = 30 }
The name property sets the workspace name. Here, "example-law" is used as a valid workspace name.
Complete the code to set the retention period of the Log Analytics workspace to 90 days.
resource "azurerm_log_analytics_workspace" "example" { name = "example-law" location = "eastus" resource_group_name = "example-resources" sku = "PerGB2018" retention_in_days = [1] }
The retention_in_days property controls how long data is kept. Setting it to 90 means data is retained for 90 days.
Fix the error in the code by selecting the correct SKU for the Log Analytics workspace.
resource "azurerm_log_analytics_workspace" "example" { name = "example-law" location = "eastus" resource_group_name = "example-resources" sku = [1] retention_in_days = 30 }
The valid SKU for Log Analytics workspace in Azure is "PerGB2018" for pay-as-you-go pricing.
Fill both blanks to create a Log Analytics workspace with a name and location.
resource "azurerm_log_analytics_workspace" "example" { name = [1] location = [2] resource_group_name = "example-resources" sku = "PerGB2018" retention_in_days = 30 }
The name is set to "my-law" and location to "eastus" to specify the workspace's name and Azure region.
Fill all three blanks to define a Log Analytics workspace with a name, retention period, and SKU.
resource "azurerm_log_analytics_workspace" "example" { name = [1] location = "eastus" resource_group_name = "example-resources" sku = [2] retention_in_days = [3] }
The workspace is named "prod-law", uses SKU "PerGB2018", and retains data for 90 days.