-
Notifications
You must be signed in to change notification settings - Fork 0
/
vm_win10dev.tf
executable file
·64 lines (53 loc) · 1.76 KB
/
vm_win10dev.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
resource "azurerm_public_ip" "abd-de-ip-win10dev" {
name = "abd-de-ip-win10dev"
location = "northcentralus"
resource_group_name = azurerm_resource_group.abd-de-rg.name
allocation_method = "Dynamic"
tags = var.abd-de-tags
}
resource "azurerm_network_interface" "abd-de-nic-win10dev" {
name = "abd-de-nic-win10dev"
location = "northcentralus"
resource_group_name = azurerm_resource_group.abd-de-rg.name
network_security_group_id = azurerm_network_security_group.abd-de-nsg.id
ip_configuration {
name = "abd-de-nic-config"
subnet_id = azurerm_subnet.abd-de-subnet.id
private_ip_address_allocation = "Dynamic"
public_ip_address_id = azurerm_public_ip.abd-de-ip-win10dev.id
}
tags = var.abd-de-tags
}
resource "azurerm_virtual_machine" "abd-de-vm-win10dev" {
name = "abd-de-vm-win10dev"
location = "northcentralus"
resource_group_name = azurerm_resource_group.abd-de-rg.name
network_interface_ids = [azurerm_network_interface.abd-de-nic-win10dev.id]
vm_size = "Standard_D4s_v3"
storage_os_disk {
name = "abd-de-vm-win10dev-OS-disk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Premium_LRS"
}
storage_image_reference {
publisher = "MicrosoftWindowsDesktop"
offer = "Windows-10"
sku = "19h2-pro"
version = "latest"
}
os_profile {
computer_name = "win10dev"
admin_username = "azureuser"
admin_password = "a!!y0urba53"
}
os_profile_windows_config {
enable_automatic_upgrades = true
provision_vm_agent = true
}
boot_diagnostics {
enabled = "true"
storage_uri = azurerm_storage_account.abd-de-storage-acct.primary_blob_endpoint
}
tags = var.abd-de-tags
}