forked from adstuart/azure-privatelink-dns-microhack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vm-extensions.tf
34 lines (27 loc) · 1.22 KB
/
vm-extensions.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
##########################################################
## Install DNS role on onprem and AZ DNS servers
##########################################################
resource "azurerm_virtual_machine_extension" "install-dns-onprem-dc" {
name = "install-dns-onprem-dc"
virtual_machine_id = azurerm_virtual_machine.onprem-dns-vm.id
publisher = "Microsoft.Compute"
type = "CustomScriptExtension"
type_handler_version = "1.9"
settings = <<SETTINGS
{
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted Install-WindowsFeature -Name DNS -IncludeAllSubFeature -IncludeManagementTools; Add-DnsServerForwarder -IPAddress 8.8.8.8 -PassThru; exit 0"
}
SETTINGS
}
resource "azurerm_virtual_machine_extension" "install-dns-az-dc" {
name = "install-dns-az-dc"
virtual_machine_id = azurerm_virtual_machine.az-dns-vm.id
publisher = "Microsoft.Compute"
type = "CustomScriptExtension"
type_handler_version = "1.9"
settings = <<SETTINGS
{
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted Install-WindowsFeature -Name DNS -IncludeAllSubFeature -IncludeManagementTools; exit 0"
}
SETTINGS
}