-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.virtual.network.tf
More file actions
22 lines (22 loc) · 814 Bytes
/
main.virtual.network.tf
File metadata and controls
22 lines (22 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
resource "azapi_resource" "vnet" {
type = "Microsoft.Network/virtualNetworks@2023-11-01"
body = {
properties = {
addressSpace = {
addressPrefixes = var.address_space
}
dhcpOptions = var.dns_servers != null ? {
dnsServers = var.dns_servers.dns_servers
} : null
ddosProtectionPlan = var.ddos_protection_plan != null ? {
id = var.ddos_protection_plan.id
} : null
enableDdosProtection = var.ddos_protection_plan != null ? var.ddos_protection_plan.enable : false
}
}
location = var.location
name = var.name
parent_id = "/subscriptions/${local.subscription_id}/resourceGroups/${var.resource_group_name}"
schema_validation_enabled = true
tags = var.tags
}