Skip to content

Instantly share code, notes, and snippets.

@imartinflores
Created June 30, 2023 14:47
Show Gist options
  • Save imartinflores/bbfc7ebd39b1c92ac5e869f9208d7b06 to your computer and use it in GitHub Desktop.
Save imartinflores/bbfc7ebd39b1c92ac5e869f9208d7b06 to your computer and use it in GitHub Desktop.
resource "azurerm_linux_virtual_machine" "yourvmname" {
name = var.azurerm_linux_virtual_machine_name
location = var.vm_location
resource_group_name = var.resource_group_name
network_interface_ids = [azurerm_network_interface.qanic.id]
size = "Standard_D2s_v3"
os_disk {
name = "diskname"
caching = "ReadWrite"
storage_account_type = "Premium_LRS"
}
source_image_reference {
publisher = "Canonical"
offer = "0001-com-ubuntu-server-focal"
sku = "20_04-lts-gen2"
version = "latest"
}
computer_name = var.azure_linux_vm_pcname
admin_username = var.azure_user_admin
admin_password = encryptedpassword
boot_diagnostics {
storage_account_uri = azurerm_storage_account.storageaccountname.primary_blob_endpoint
}
tags = { environment = "yourenvironment" }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment