You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Terraform module deploys Virtual Machines in Azure with the following characteristics:
5
+
6
+
- Ability to specify a simple string to get the latest marketplace image using `var.vm_os_simple`
7
+
- All VMs use managed disks
8
+
- Network Security Group (NSG) created and only if `var.remote_port` specified, then remote access rule created and opens this port to all nics
9
+
- VM nics attached to a single virtual network subnet of your choice (new or existing) via `var.vnet_subnet_id`.
10
+
- Public IP is created and attached only to the first VM's nic. Once into this VM, connection can be make to the other vms using the private ip on the VNet.
11
+
12
+
Module Input Variables
13
+
----------------------
14
+
15
+
-`resource_group_name` - The name of the resource group in which the resources will be created. - default `compute`
16
+
-`location` - The Azure location where the resources will be created.
17
+
-`vnet_subnet_id` - The subnet id of the virtual network where the virtual machines will reside.
18
+
-`public_ip_dns` - Optional globally unique per datacenter region domain name label to apply to the public ip address. e.g. thisvar.varlocation.cloudapp.azure.com
19
+
-`admin_password` - The password of the administrator account. The password must comply with the complexity requirements for Azure virtual machines.
20
+
-`ssh_key` - The path on the local machine of the ssh public key in the case of a Linux deployment. - default `~/.ssh/id_rsa.pub`
21
+
-`remote_port` - Tcp port number to enable remote access to the nics on the vms via a NSG rule. Set to blank to disable.
22
+
-`admin_username` - The name of the administrator to access the machines part of the virtual machine scale set. - default `azureuser`
23
+
-`storage_account_type` - Defines the type of storage account to be created. Valid options are Standard_LRS, Standard_ZRS, Standard_GRS, Standard_RAGRS, Premium_LRS. - default `Premium_LRS`
24
+
-`vm_size` - The initial size of the virtual machine that will be deployed. - default `Standard_DS1_V2`
25
+
-`nb_instances` - The number of instances that will be initially deployed in the virtual machine scale set. - default `1`
26
+
-`vm_hostname` - local name of the VM. - default `myvm`
27
+
-`vm_os_simple`- This variable allows to use a simple name to reference Linux or Windows operating systems. When used, you can ommit the `vm_os_publisher`, `vm_os_offer` and `vm_os_sku`. The supported values are: "UbuntuServer", "WindowsServer", "RHEL", "openSUSE-Leap", "CentOS", "Debian", "CoreOS" and "SLES".
28
+
-`vm_os_id` - The ID of the image that you want to deploy if you are using a custom image. When used, you can ommit the `vm_os_publisher`, `vm_os_offer` and `vm_os_sku`.
29
+
-`vm_os_publisher` - The name of the publisher of the image that you want to deploy, for example "Canonical" if you are not using the `vm_os_simple` or `vm_os_id` variables.
30
+
-`vm_os_offer` - The name of the offer of the image that you want to deploy, for example "UbuntuServer" if you are not using the `vm_os_simple` or `vm_os_id` variables.
31
+
-`vm_os_sku` - The sku of the image that you want to deploy, for example "14.04.2-LTS" if you are not using the `vm_os_simple` or `vm_os_id` variables.
32
+
-`vm_os_version` - The version of the image that you want to deploy. - default `latest`
33
+
-`public_ip_address_allocation` - Defines how an IP address is assigned. Options are Static or Dynamic. - default `static`
34
+
-`tags` - A map of the tags to use on the resources that are deployed with this module.
35
+
36
+
Usage
37
+
-----
38
+
39
+
Provisions 2 Windows 2016 Datacenter Server VMs using `vm_os_simple` to a new VNet and opens up port 3389 for RDP access:
value = "${module.mycompute.network_interface_private_ip}"
70
+
}
71
+
}
72
+
73
+
```
74
+
Provisions 2 Ubuntu 14.04 Server VMs using `vm_os_publisher`, `vm_os_offer` and `vm_os_sku` to a new VNet and opens up port 22 for SSH access with ~/.ssh/id_rsa.pub :
0 commit comments