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

CMCS-Norway/terraform-azurerm-vm

 
 

Repository files navigation

Terraform module for deploying Azure VMs

A module used for deploying virtual machines in Azure.

Requirements

Terraform >= 1.5.0
azurerm = 3.67.0

Example deployment

Check out the examples folder for more.

module "virtual_machine" {
  source  = "CMCS-Norway/vm/azurerm"
  version = "1.13.12"

  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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%