This module is used to deploy multiple resources (storage account,log analytics workspace) that will be used for the gathering of diagnostic informations and logging.
Name | Version |
---|---|
terraform | >= 0.12 |
azurerm | >= 2.0.0 |
Name | Version |
---|---|
azurerm | >= 2.0.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
account_replication_type | The type of replication to use for this storage account. Valid options are ‘LRS’,‘GRS’,‘RAGRS’ and ‘ZRS’. | string |
"LRS" |
no |
account_tier | Type of the tier to use for the storage account.Changing this force a new resource to be created. | string |
"Standard" |
no |
diagnostics_count | How many diagnostics settings to create. | number |
1 |
no |
enable_https_traffic_only | Boolean flag which forces HTTPS if enabled. | bool |
true |
no |
enabled | Enable or disable module. | bool |
true |
no |
log_analytics_destination_type | when set to Dedicated logs sent to a log analytics workspace will go into resource specific tables, instead of the legacy Azurediagnostics table. Note: This setting will only have an effect if a log_analytics_workspace_id is provided, and the resource is avaliable for resource-specific logs. |
list(string) |
[ |
no |
log_analytics_workspace_name | Name of the workspace to deploy to be used for logging.Changing this forces a new resource to be created. | string |
"" |
no |
log_analytics_workspace_tags | Tags which will be associated to the log analytics workspace. | map |
{} |
no |
logs | A list of list of map of options to apply. Map must support the following structure: * category(required, string): The name of a diagnostic log category for the resource. Note: The log categories available vary depending on the resource begin used. You may wish to use azurerm_monitor_diagnostc_catehories data source to identify which categories are available for a given resource.* enabled(Optional, boolean): Is this Diagnostic metric enabled? * retention_policy(Optional, list of map): A list of map of retention policies to apply * enabled(required, boolean): Is this retention policy enabled? * days(Optional, number): The number of days for which this retention policy should be applied. Note: Setting this to 0 will retain the events indefinetly. For example, see folder example/default folder. |
list |
[ |
no |
metrics | A list of list of map of options to apply. Map must support the following structure: * category(required, string): The name of a diagnostic log category for the resource. Note: The metric categories available vary depending on the resource begin used. You may wish to use azurerm_monitor_diagnostc_catehories data source to identify which categories are available for a given resource.* enabled(Optional, boolean): Is this Diagnostic metric enabled? * retention_policy(Optional, list of map): A list of map of retention policies to apply * enabled(required, boolean): Is this retention policy enabled? * days(Optional, number): The number of days for which this retention policy should be applied. Note: Setting this to 0 will retain the events indefinetly. For example, see folder example/default folder. |
list |
[ |
no |
names | List which specifies the names of the diagnostics settings. Changing this forces a new resource to be created. | list(string) |
[ |
no |
resource_group_location | Location where the resources will be deployed.Changing this forces a new resource to be created. | string |
"canadacentral" |
no |
resource_group_name | Name of the resource group where the resource will be deployed.Changing this forces a new resource to be created. | string |
"" |
no |
retention_in_days | Number of days that logs will be retained in the workspace. | number |
7 |
no |
storage_account_exist | Boolean flag which describes whhether the storage account is already existing or not. | bool |
false |
no |
storage_account_name | Name of the storage account to be used to host the logs. Changing forces a new resource to be created. | string |
"" |
no |
storage_account_tags | Tags which will specifically assigned to the storage account. | map |
{} |
no |
storage_containers | List of containers to create and their access levels. | list(object({ name = string, access_type = string })) |
[] |
no |
storage_shares | List of share to create | list(object({ name = string, quota = string })) |
[] |
no |
tags | Tags shared by all resource of tis module. Will be merged with any other specific tags by resource. | map |
{} |
no |
target_resource_ids | The list of IDs of an existing resource on which to configure diagnostic settings. Changing this forces a new resource to be created. | list(string) |
[ |
no |
workspace_exist | Boolean flag which describes whhether the log analytics workspace is already existing or not. | bool |
false |
no |
workspace_sku | SKU of the workspace to deploy to be used for logging.Changing this forces a new resource to be created. | string |
"free" |
no |
Name | Description |
---|---|
id | ID of the diagnostics setting. |
log_analytics_primary_shared_key | n/a |
log_analytics_secondary_shared_key | n/a |
log_analytics_workspace_id | n/a |
storage_account_id | The ID of the storage account. |