-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path8-client7.tf
51 lines (44 loc) · 1.48 KB
/
8-client7.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
####################################
####### Client 7 #######################
####################################
# Creating a NIC for internal network on Client7
resource "azurerm_network_interface" "client7_internalnic" {
name = "client7_intnic"
location = var.location
resource_group_name = var.rg
ip_configuration {
name = "client7_internal"
subnet_id = azurerm_subnet.subnet.id
private_ip_address_allocation = "Dynamic"
}
}
#Creating client7 VM
resource "azurerm_virtual_machine" "client7" {
name = "client7"
resource_group_name = var.rg
location = var.location
network_interface_ids = [azurerm_network_interface.client7_internalnic.id]
vm_size = "Standard_D1_v2"
primary_network_interface_id = azurerm_network_interface.client7_internalnic.id
delete_os_disk_on_termination = true
delete_data_disks_on_termination = true
storage_image_reference {
publisher = "MicrosoftWindowsDesktop"
offer = "Windows-7"
sku = "win7-enterprise"
version = "latest"
}
storage_os_disk {
name = "client7disk"
caching = "ReadWrite"
create_option = "FromImage"
}
os_profile {
computer_name = "client7"
admin_username = var.username
admin_password = var.password
}
os_profile_windows_config {
provision_vm_agent = true
}
}