-
Notifications
You must be signed in to change notification settings - Fork 0
/
virtualmachies.tf
79 lines (66 loc) · 2.28 KB
/
virtualmachies.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
resource "azurerm_virtual_machine" "yanakiev-vm1" {
name = "zltdimitar001"
location = "${var.location}"
resource_group_name = "${var.resource_group_name}"
network_interface_ids = ["${azurerm_network_interface.yanakiev-ni1.id}"]
vm_size = "Standard_D2_v3"
storage_os_disk {
name = "zltdimitar001disk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}
storage_image_reference {
publisher = "RedHat"
offer = "RHEL"
sku = "7.3"
version = "latest"
}
os_profile {
computer_name = "zltdimitar001"
admin_username = "${var.vm_username}"
}
os_profile_linux_config {
disable_password_authentication = true
ssh_keys {
path = "/home/${var.vm_username}/.ssh/authorized_keys"
key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBqSBtoy1sJ+RhftrH+HWu4hrQ3PW5Sf8G1CtwS8fxVNNCYasDVi5bCRMSNNzPj87vNID+lJ4AqV7mvzybR7/TdJjrOHvTns1H6hxEs72AfP1gY68iVBR2eWZz+5ec42FDQoEDSGWFZfc6sJ3/d8n5k7isoSQYhfz4RjFpTpQj8zw== rsa-key-20180516"
}
}
tags {
user = "${var.tag}"
}
}
resource "azurerm_virtual_machine" "yanakiev-vm2" {
name = "zltdimitar002"
location = "${var.location}"
resource_group_name = "${var.resource_group_name}"
network_interface_ids = ["${azurerm_network_interface.yanakiev-ni2.id}"]
vm_size = "Standard_D2_v3"
storage_os_disk {
name = "zltdimitar002disk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}
storage_image_reference {
publisher = "RedHat"
offer = "RHEL"
sku = "7.3"
version = "latest"
}
os_profile {
computer_name = "zltdimitar002"
admin_username = "${var.vm_username}"
}
os_profile_linux_config {
disable_password_authentication = true
ssh_keys {
path = "/home/${var.vm_username}/.ssh/authorized_keys"
key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBqSBtoy1sJ+RhftrH+HWu4hrQ3PW5Sf8G1CtwS8fxVNNCYasDVi5bCRMSNNzPj87vNID+lJ4AqV7mvzybR7/TdJjrOHvTns1H6hxEs72AfP1gY68iVBR2eWZz+5ec42FDQoEDSGWFZfc6sJ3/d8n5k7isoSQYhfz4RjFpTpQj8zw== rsa-key-20180516"
}
}
tags {
user = "${var.tag}"
}
}