-
Notifications
You must be signed in to change notification settings - Fork 0
/
vm_demoprod02.tf
executable file
·66 lines (55 loc) · 2.2 KB
/
vm_demoprod02.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
resource "azurerm_public_ip" "abd-de-ip-demoprod02" {
name = "abd-de-ip-demoprod02"
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-demoprod02" {
name = "abd-de-nic-demoprod02"
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-demoprod02.id
}
tags = var.abd-de-tags
}
resource "azurerm_virtual_machine" "abd-de-vm-demoprod02" {
name = "abd-de-vm-demoprod02"
location = "northcentralus"
resource_group_name = azurerm_resource_group.abd-de-rg.name
network_interface_ids = [azurerm_network_interface.abd-de-nic-demoprod02.id]
vm_size = "Standard_D4s_v3"
storage_os_disk {
name = "abd-de-vm-demoprod02-OS-disk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Premium_LRS"
}
storage_image_reference {
publisher = "Canonical"
offer = "UbuntuServer"
sku = "18.04-LTS"
version = "latest"
}
os_profile {
computer_name = "demoprod02"
admin_username = "azureuser"
}
os_profile_linux_config {
disable_password_authentication = true
ssh_keys {
path = "/home/azureuser/.ssh/authorized_keys"
key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAocTmdfswVF5LZzWsr1fUNHesHo9Xb5/OOaA0DV96KYmy2kYP0KkG3gqvY9cMBcJ6cJYdsc563DN06BqQqaIp1e+SoVDuXIngACXlFotjidbsqoN+ffenqQKw3LjzjXmj6+IKWZEDt9gLtosxqIdizyPvTmAFiGsGQlhWeW/rWg2TPXvlFV4TZdmo12V/6stb3p6yQbqVcRhSFodoMSAhd99RlMJicTHhX+H5kIkRA7AOK1DDkDqIe4k66vwtud1qqhHuXbKvThg9mQtXuj6JUw3CDEs7V2IgepIN9RULyIMWh8oX4E5YHlqPVPQgz0wKApffnKESk8Rlpuo8HfwCgQ== shahn@ch12ldvdi227"
}
}
boot_diagnostics {
enabled = "true"
storage_uri = azurerm_storage_account.abd-de-storage-acct.primary_blob_endpoint
}
tags = var.abd-de-tags
}