-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.tf
More file actions
25 lines (19 loc) · 908 Bytes
/
main.tf
File metadata and controls
25 lines (19 loc) · 908 Bytes
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
resource "azurerm_virtual_network" "vnet" {
name = var.name
resource_group_name = var.resource_group_name
address_space = [var.vnet_address_space]
location = var.location
dns_servers = var.dns_servers
tags = var.tags
}
/* --------------------------------------------------------------------------------------------------
Diagnostic Settings
-------------------------------------------------------------------------------------------------- */
module "diagnostic-settings" {
source = "../diagnostic-settings"
name = "${var.name}-diagnostic-setting"
target_resource_id = azurerm_virtual_network.vnet.id
log_analytics_workspace_id = var.log_analytics_workspace_id
enabled_log = var.monitor_diagnostic_setting_vnet_enabled_logs
enabled_metric = var.monitor_diagnostic_setting_vnet_metrics
}