Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

evry/tf-module-azure-availability-set

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module for creating x amount of Windows VMs in an Availability set

This modules create x amount of Windows VMs in an Availability set inside an already provisioned resource group. Detail on how to use this module follow below.

Resources created when using this module

  • Availability set
  • x amount of Network Interfaces
  • x amount of VMs

Using this module

Inputs

Name Description Type Default Required
existing_rg_for_resources Name of the resource group to put the resources in string - yes
existing_subnet_id Specify existing subnet's resource id string - yes
image_offer string WindowsServer no
image_publisher string MicrosoftWindowsServer no
image_sku string 2016-Datacenter no
image_version string latest no
location Location of the resources string West Europe no
num_instances The number of VMs to put in a availability set string - yes
vm_size The size of the VMs string Standard_A0 no
vm_type A descriptive name of the type of VM. Example: AD / Web string - yes
name_prefix This variable is used to name resources and is fetched from environment variable string - yes*
vm_username This variable is used to specify VM username and is fetched from environment variable string - yes*
vm_password This variable is used to specify VM password and is fetched from environment variable string - yes*

Outputs

Name Description
vm_names Name of the virtual machines created
vm_private_ip Outputs the private IP to the x amount of VMs created

Example usage of this module

module "availability-set" {
  source                    = "git::https://github.com/evry/tf-module-azure-availability-set"
  num_instances             = 2
  existing_subnet_id        = "${azurerm_subnet.infra.id}"
  existing_rg_for_resources = "${azurerm_resource_group.ctx.name}"
  name_prefix               = "${var.name_prefix}"
  vm_username               = "${var.vm_username}"
  vm_password               = "${var.vm_password}"
  vm_type                   = "Web"
  vm_size                   = "Standard_A2_V2"
  image_publisher           = "${var.image_publisher}"
  image_offer               = "${var.image_offer}"
  image_sku                 = "${var.image_sku}"
  image_version             = "${var.image_version}"
}

Example for destroying the module

terraform destroy -target=module.availability-set

About

Terraform Azure module for creating an availability set

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages