Skip to content

This module creates both Windows and Linux VM, deals with data disks and networking, enabling backup and much more.

License

Notifications You must be signed in to change notification settings

crayon/terraform-azurerm-vm

Repository files navigation

Terraform module for deploying Azure VMs

A module used for deploying virtual machines in Azure.

Requirements

Terraform >= 1.0.6
azurerm = 2.88.1

Example deployment

Check out the examples folder for more.

module "virtual_machine" {
  source  = "crayon/vm/azurerm"
  version = "1.0.0"

  name                  = "vm-example"
  resource_group        = azurerm_resource_group.example.name
  network_interface_ids = [azurerm_network_interface.example.id]

  admin_user = {
    username = "crayonadm"
    ssh_key  = file("~/.ssh/id_rsa.pub")
  }

  data_disks = [{
    name                 = "disk01"
    storage_account_type = "Standard_LRS"
    create_option        = "Empty"
    caching              = "ReadWrite"
    lun                  = 10
    disk_size_gb         = 50
    },
    {
      name                 = "disk02"
      storage_account_type = "Standard_LRS"
      create_option        = "Empty"
      caching              = "ReadWrite"
      lun                  = 11
      disk_size_gb         = 50
  }]
}

About

This module creates both Windows and Linux VM, deals with data disks and networking, enabling backup and much more.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages