Skip to content

Instantly share code, notes, and snippets.

@straubt1
Last active October 26, 2018 13:27
Show Gist options
  • Save straubt1/29892c9140f84507e7dc970ae80d33a0 to your computer and use it in GitHub Desktop.
Save straubt1/29892c9140f84507e7dc970ae80d33a0 to your computer and use it in GitHub Desktop.
resource "azurerm_virtual_machine" "myvm" {
name = "myvm0"
resource_group_name = "my-rg"
vm_size = "Standard_A2_v2"
location = "centralus"
network_interface_ids = ["${azurerm_network_interface.myvm.id}"]
storage_image_reference {
publisher = "MicrosoftWindowsServer"
offer = "WindowsServer"
sku = "2016 - Datacenter"
version = "latest"
}
storage_os_disk {
name = "myvm0-osdisk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}
os_profile {
computer_name ="myvm0"
admin_username ="testadmin"
admin_password ="SuperSecretPassword"
}
storage_data_disk {
name = "datadisk0"
lun = 0
disk_size_gb = 32
create_option = "Empty"
managed_disk_type = "Standard_LRS"
}
storage_data_disk {
name = "datadisk1"
lun = 1
disk_size_gb = 128
create_option = "Empty"
managed_disk_type = "Standard_LRS"
}
storage_data_disk {
name = "datadisk2"
lun = 2
disk_size_gb = 64
create_option = "Empty"
managed_disk_type = "Standard_LRS"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment