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.
- Availability set
- x amount of Network Interfaces
- x amount of VMs
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* |
Name | Description |
---|---|
vm_names | Name of the virtual machines created |
vm_private_ip | Outputs the private IP to the x amount of VMs created |
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}"
}
terraform destroy -target=module.availability-set