|
1 | | -- [Load balanced Azure linux virtual machines with Terraform](#load-balanced-azure-linux-virtual-machines-with-terraform) |
2 | | - - [Prerequisites](#prerequisites) |
3 | | - - [Assumption](#assumption) |
4 | | - - [Provisioning](#provisioning) |
5 | | - - [Terraform Backend Configuration](#terraform-backend-configuration) |
6 | | - - [Sign into Azure Account](#sign-into-azure-account) |
7 | | - - [Create infrastructure required for remote backend](#create-infrastructure-required-for-remote-backend) |
8 | | - - [Configure Terraform azurerm backend](#configure-terraform-azurerm-backend) |
9 | | - - [Terraform Plan](#terraform-plan) |
10 | | - - [Terraform Apply](#terraform-apply) |
11 | | - - [Getting the Loadbalancer FQDN](#getting-the-loadbalancer-fqdn) |
12 | | - - [Destroy the Infrastructure](#destroy-the-infrastructure) |
13 | | - - [Requirements](#requirements) |
14 | | - - [Providers](#providers) |
15 | | - - [Modules](#modules) |
16 | | - - [Resources](#resources) |
17 | | - - [Inputs](#inputs) |
18 | | - - [Outputs](#outputs) |
19 | | - - [License](#license) |
20 | | - |
21 | 1 | # Load balanced Azure linux virtual machines with Terraform |
22 | 2 |
|
| 3 | +## Introduction |
| 4 | + |
23 | 5 | This directory provides terraform configurations to provison load balanced linux virtual machines on [Microsoft Azure]() cloud platform. Further these machines can be any assigned any role. For this repository context they are configurred as Nginx Webservers hosting static web application using [Ansible](). |
24 | 6 |
|
25 | 7 | ## Prerequisites |
@@ -152,64 +134,64 @@ make destroy |
152 | 134 |
|
153 | 135 | ## Requirements |
154 | 136 |
|
155 | | -| Name | Version | |
156 | | -|---------------------------------------------------------------------------|----------| |
| 137 | +| Name | Version | |
| 138 | +|------|---------| |
157 | 139 | | <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.1.0 | |
158 | | -| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.50 | |
| 140 | +| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.50 | |
159 | 141 |
|
160 | 142 | ## Providers |
161 | 143 |
|
162 | | -| Name | Version | |
163 | | -|---------------------------------------------------------------|---------| |
164 | | -| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.67.0 | |
165 | | -| <a name="provider_http"></a> [http](#provider\_http) | 3.4.0 | |
| 144 | +| Name | Version | |
| 145 | +|------|---------| |
| 146 | +| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.67.0 | |
| 147 | +| <a name="provider_http"></a> [http](#provider\_http) | 3.4.0 | |
166 | 148 |
|
167 | 149 | ## Modules |
168 | 150 |
|
169 | | -| Name | Source | Version | |
170 | | -|---------------------------------------------------------------------------------------------|----------------------------------------------|---------| |
171 | | -| <a name="module_ssh_key_generator"></a> [ssh\_key\_generator](#module\_ssh\_key\_generator) | github.com/ishuar/terraform-sshkey-generator | v1.1.0 | |
| 151 | +| Name | Source | Version | |
| 152 | +|------|--------|---------| |
| 153 | +| <a name="module_ssh_key_generator"></a> [ssh\_key\_generator](#module\_ssh\_key\_generator) | github.com/ishuar/terraform-sshkey-generator | v1.1.0 | |
172 | 154 |
|
173 | 155 | ## Resources |
174 | 156 |
|
175 | | -| Name | Type | |
176 | | -|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------| |
177 | | -| [azurerm_lb.web_lb](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb) | resource | |
178 | | -| [azurerm_lb_backend_address_pool.nginx_webservers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_backend_address_pool) | resource | |
179 | | -| [azurerm_lb_probe.web_lb_probe](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_probe) | resource | |
180 | | -| [azurerm_lb_rule.web_lb_rule_app1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_rule) | resource | |
181 | | -| [azurerm_linux_virtual_machine.slaves](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine) | resource | |
182 | | -| [azurerm_network_interface.public](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface) | resource | |
183 | | -| [azurerm_network_interface_backend_address_pool_association.web_nic_lb_associate](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_backend_address_pool_association) | resource | |
184 | | -| [azurerm_network_interface_security_group_association.webserver](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_security_group_association) | resource | |
185 | | -| [azurerm_network_security_group.webserver](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | resource | |
186 | | -| [azurerm_network_security_rule.azurecloud](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule) | resource | |
187 | | -| [azurerm_network_security_rule.lb_to_webservers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule) | resource | |
188 | | -| [azurerm_network_security_rule.ssh](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule) | resource | |
189 | | -| [azurerm_public_ip.loadbalancer](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource | |
190 | | -| [azurerm_public_ip.pip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource | |
191 | | -| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource | |
192 | | -| [azurerm_subnet.webservers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | resource | |
193 | | -| [azurerm_virtual_network.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network) | resource | |
194 | | -| [http_http.self_ip](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source | |
| 157 | +| Name | Type | |
| 158 | +|------|------| |
| 159 | +| [azurerm_lb.web_lb](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb) | resource | |
| 160 | +| [azurerm_lb_backend_address_pool.nginx_webservers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_backend_address_pool) | resource | |
| 161 | +| [azurerm_lb_probe.web_lb_probe](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_probe) | resource | |
| 162 | +| [azurerm_lb_rule.web_lb_rule_app1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_rule) | resource | |
| 163 | +| [azurerm_linux_virtual_machine.slaves](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine) | resource | |
| 164 | +| [azurerm_network_interface.public](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface) | resource | |
| 165 | +| [azurerm_network_interface_backend_address_pool_association.web_nic_lb_associate](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_backend_address_pool_association) | resource | |
| 166 | +| [azurerm_network_interface_security_group_association.webserver](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_security_group_association) | resource | |
| 167 | +| [azurerm_network_security_group.webserver](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | resource | |
| 168 | +| [azurerm_network_security_rule.azurecloud](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule) | resource | |
| 169 | +| [azurerm_network_security_rule.lb_to_webservers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule) | resource | |
| 170 | +| [azurerm_network_security_rule.ssh](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule) | resource | |
| 171 | +| [azurerm_public_ip.loadbalancer](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource | |
| 172 | +| [azurerm_public_ip.pip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource | |
| 173 | +| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource | |
| 174 | +| [azurerm_subnet.webservers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | resource | |
| 175 | +| [azurerm_virtual_network.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network) | resource | |
| 176 | +| [http_http.self_ip](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source | |
195 | 177 |
|
196 | 178 | ## Inputs |
197 | 179 |
|
198 | | -| Name | Description | Type | Default | Required | |
199 | | -|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------|----------------------------------------------|:--------:| |
200 | | -| <a name="input_ENABLE_LOCAL_DEVELOPMENT"></a> [ENABLE\_LOCAL\_DEVELOPMENT](#input\_ENABLE\_LOCAL\_DEVELOPMENT) | (optional) Whether to enable Flag for local development or working from the hostmachine directly or not. Default is true | `bool` | `true` | no | |
201 | | -| <a name="input_create_ssh_key_via_terraform"></a> [create\_ssh\_key\_via\_terraform](#input\_create\_ssh\_key\_via\_terraform) | (optional) Whether to enable ssh key generation via terraform or not. Defaults to true | `bool` | `true` | no | |
202 | | -| <a name="input_prefix"></a> [prefix](#input\_prefix) | (optional) Prefix used for naming resources | `string` | `"ansible-vm"` | no | |
203 | | -| <a name="input_private_key_filename"></a> [private\_key\_filename](#input\_private\_key\_filename) | (optional) SSH private key filename create by terraform will be stored on your local machine in ssh\_keys directory. | `string` | `"ssh_keys/terraform-generated-private-key"` | no | |
| 180 | +| Name | Description | Type | Default | Required | |
| 181 | +|------|-------------|------|---------|:--------:| |
| 182 | +| <a name="input_ENABLE_LOCAL_DEVELOPMENT"></a> [ENABLE\_LOCAL\_DEVELOPMENT](#input\_ENABLE\_LOCAL\_DEVELOPMENT) | (optional) Whether to enable Flag for local development or working from the hostmachine directly or not. Default is true | `bool` | `true` | no | |
| 183 | +| <a name="input_create_ssh_key_via_terraform"></a> [create\_ssh\_key\_via\_terraform](#input\_create\_ssh\_key\_via\_terraform) | (optional) Whether to enable ssh key generation via terraform or not. Defaults to true | `bool` | `true` | no | |
| 184 | +| <a name="input_prefix"></a> [prefix](#input\_prefix) | (optional) Prefix used for naming resources | `string` | `"ansible-vm"` | no | |
| 185 | +| <a name="input_private_key_filename"></a> [private\_key\_filename](#input\_private\_key\_filename) | (optional) SSH private key filename create by terraform will be stored on your local machine in ssh\_keys directory. | `string` | `"ssh_keys/terraform-generated-private-key"` | no | |
204 | 186 |
|
205 | 187 | ## Outputs |
206 | 188 |
|
207 | | -| Name | Description | |
208 | | -|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------| |
209 | | -| <a name="output_loadbalancer_frontend_fqdn"></a> [loadbalancer\_frontend\_fqdn](#output\_loadbalancer\_frontend\_fqdn) | Fully qualified domain name for loadbalancer front end to reach backend webservers | |
210 | | -| <a name="output_nsg_name"></a> [nsg\_name](#output\_nsg\_name) | Network Security group name | |
211 | | -| <a name="output_resource_group"></a> [resource\_group](#output\_resource\_group) | Resource group where all resources are deployed | |
212 | | -| <a name="output_webservers_snet_address_prefix"></a> [webservers\_snet\_address\_prefix](#output\_webservers\_snet\_address\_prefix) | Webservers Subnet Address prefix | |
| 189 | +| Name | Description | |
| 190 | +|------|-------------| |
| 191 | +| <a name="output_loadbalancer_frontend_fqdn"></a> [loadbalancer\_frontend\_fqdn](#output\_loadbalancer\_frontend\_fqdn) | Fully qualified domain name for loadbalancer front end to reach backend webservers | |
| 192 | +| <a name="output_nsg_name"></a> [nsg\_name](#output\_nsg\_name) | Network Security group name | |
| 193 | +| <a name="output_resource_group"></a> [resource\_group](#output\_resource\_group) | Resource group where all resources are deployed | |
| 194 | +| <a name="output_webservers_snet_address_prefix"></a> [webservers\_snet\_address\_prefix](#output\_webservers\_snet\_address\_prefix) | Webservers Subnet Address prefix | |
213 | 195 |
|
214 | 196 | ## License |
215 | 197 |
|
|
0 commit comments