generated from azurenoops/terraform-module-overlays-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodules.management.spoke.diagnostic.setting.tf
48 lines (37 loc) · 1.61 KB
/
modules.management.spoke.diagnostic.setting.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
/*
SUMMARY: Module to configure diagnostic settings for VNet, NSG, PIP, Bastion and Firewall
DESCRIPTION: The following components will be options in this deployment
* Diagnostic settings for VNet
* Diagnostic settings for NSG
AUTHOR/S: jrspinella
*/
##############################################
### Azure Monitor diagnostics Configuration ##
##############################################
module "mod_vnet_diagnostic_settings" {
source = "azurenoops/overlays-diagnostic-settings/azurerm"
version = "1.5.0"
# Resource Group, location, VNet and Subnet details
location = var.location
deploy_environment = var.deploy_environment
environment = var.environment
org_name = var.org_name
workload_name = format("%s-vnet", var.workload_name)
resource_id = module.spoke_vnet.resource_id
logs_destinations_ids = [var.existing_log_analytics_workspace_resource_id, module.spoke_st.resource.id]
}
module "mod_nsg_diagnostic_settings" {
source = "azurenoops/overlays-diagnostic-settings/azurerm"
version = "1.5.0"
for_each = var.spoke_subnets
# Resource Group, location, VNet and Subnet details
location = var.location
deploy_environment = var.deploy_environment
environment = var.environment
org_name = var.org_name
workload_name = format("%s-nsg", var.workload_name)
resource_id = module.nsg[each.key].resource_id
logs_destinations_ids = [var.existing_log_analytics_workspace_resource_id, module.spoke_st.resource.id]
}