vm

Virtual Machine

Compute & WebAzure
General

General information about the service.

Description

On-demand, scalable computing resource.

Namespace and Entity

Microsoft.Compute/virtualMachines

Chat

Powered by AI

Talk to this service to learn more about it.

Suggested questions:

Naming

The conventions, rules, and restrictions for naming this service.

Naming Convention

vm

Length

1-15

Valid Characters

Alphanumerics, hyphens, underscores.

Scope

resource group

Code

Deploy your infrastructure as code using your preferred tooling.

Official DocumentationTerraform
terraform
1resource "azurerm_linux_virtual_machine" "main" {
2 name = "vm-${var.project}-${var.environment}"
3 location = azurerm_resource_group.main.location
4 resource_group_name = azurerm_resource_group.main.name
5 size = "Standard_D4s_v3"
6 admin_username = var.admin_username
7 network_interface_ids = [azurerm_network_interface.main.id]
8
9 admin_ssh_key {
10 username = var.admin_username
11 public_key = file(var.ssh_public_key_path)
12 }
13
14 os_disk {
15 caching = "ReadWrite"
16 storage_account_type = "Premium_LRS"
17 disk_size_gb = 128
18 }
19
20 source_image_reference {
21 publisher = "Canonical"
22 offer = "0001-com-ubuntu-server-jammy"
23 sku = "22_04-lts-gen2"
24 version = "latest"
25 }
26
27 identity {
28 type = "SystemAssigned"
29 }
30
31 tags = var.tags
32}
Utilities

Utilities to support app deployment or configuration.