Debian Codegraph @

test/tf/azurerm/modules/virtual_machine/2-virtual-machine.tf

raw
1 resource "azurerm_virtual_machine" "main" {
2 name = "${var.name}-vm"
3 location = "${var.location}"
4 resource_group_name = "${var.resource_group_name}"
5 network_interface_ids = ["${azurerm_network_interface.internal.id}"]
6 vm_size = "${var.size}"
7
8 storage_image_reference {
9 publisher = "Canonical"
10 offer = "UbuntuServer"
11 sku = "14.04.5-LTS"
12 version = "latest"
13 }
14
15 storage_os_disk {
16 name = "${var.name}-osdisk"
17 caching = "ReadWrite"
18 create_option = "FromImage"
19 managed_disk_type = "Standard_LRS"
20 }
21
22 os_profile {
23 computer_name = "${var.name}"
24 admin_username = "${var.username}"
25 admin_password = "${random_string.password.result}"
26 }
27
28 os_profile_linux_config {
29 disable_password_authentication = false
30 }
31 }
32
33 resource "random_string" "password" {
34 length = 16
35 }