|
| 1 | +# Terraform Template - Azure Application Gateway |
| 2 | + |
| 3 | +Costa Rica |
| 4 | + |
| 5 | +[](https://github.com/) |
| 6 | +[brown9804](https://github.com/brown9804) |
| 7 | + |
| 8 | +Last updated: 2025-06-12 |
| 9 | + |
| 10 | +---------- |
| 11 | + |
| 12 | +> This template contains Terraform configurations to create and manage an Azure Application Gateway with its associated components including public IP, backend pool, and request routing rules. |
| 13 | +
|
| 14 | +> [!NOTE] |
| 15 | +> The Application Gateway configuration uses Standard_v2 SKU, providing enhanced features like autoscaling, zone redundancy, and Web Application Firewall. |
| 16 | +
|
| 17 | +<p align="center"> |
| 18 | + <img width="550" alt="image" src="https://github.com/user-attachments/assets/d2f8a37d-f1bc-4da5-9fff-eb8e89905315"> |
| 19 | +</p> |
| 20 | + |
| 21 | +## File Descriptions |
| 22 | + |
| 23 | +- **main.tf**: Contains the main configuration for creating the Azure Application Gateway and its associated resources. |
| 24 | +- **variables.tf**: Defines the input variables used in the Terraform configuration. |
| 25 | +- **provider.tf**: Configures the Azure provider to interact with Azure resources. |
| 26 | +- **terraform.tfvars**: Provides default values for the variables defined in `variables.tf`. |
| 27 | +- **outputs.tf**: Defines the outputs such as Application Gateway ID and public IP address. |
| 28 | + |
| 29 | +## Variables |
| 30 | + |
| 31 | +> Below is a list of variables used in this template, their expected values, types, and examples: |
| 32 | +
|
| 33 | +| Variable Name | Description | Type | Example Value | |
| 34 | +|--------------|-------------|------|---------------| |
| 35 | +| `subscription_id` | The Azure subscription ID | string | `"12345678-abcd-efgh-ijkl-9876543210"` | |
| 36 | +| `resource_group_name` | The name of the resource group | string | `"appgw-resource-group"` | |
| 37 | +| `location` | The Azure region to deploy resources | string | `"eastus"` | |
| 38 | +| `public_ip_name` | The name of the public IP address | string | `"appgw-public-ip"` | |
| 39 | +| `app_gateway_name` | The name of the Application Gateway | string | `"my-app-gateway"` | |
| 40 | +| `vnet_name` | The name of the virtual network | string | `"appgw-vnet"` | |
| 41 | +| `vnet_address_space` | The address space of the virtual network | list(string) | `["10.0.0.0/16"]` | |
| 42 | +| `subnet_name` | The name of the subnet for the Application Gateway | string | `"appgw-subnet"` | |
| 43 | +| `subnet_address_prefixes` | The address prefixes for the subnet | list(string) | `["10.0.1.0/24"]` | |
| 44 | + |
| 45 | +## Usage |
| 46 | + |
| 47 | +1. Clone the repository and navigate to the application gateway directory. |
| 48 | +2. Update the `terraform.tfvars` file with your values. |
| 49 | +3. Initialize and apply the Terraform configuration: |
| 50 | + |
| 51 | +```bash |
| 52 | +terraform init |
| 53 | +terraform plan |
| 54 | +terraform apply |
| 55 | +``` |
| 56 | + |
| 57 | +## Outputs |
| 58 | + |
| 59 | +| Output Name | Description | |
| 60 | +|-------------|-------------| |
| 61 | +| `application_gateway_id` | The ID of the Application Gateway | |
| 62 | +| `public_ip_address` | The frontend public IP address of the Application Gateway | |
| 63 | +| `virtual_network_name` | The name of the virtual network | |
| 64 | +| `subnet_name` | The name of the subnet used by the Application Gateway | |
| 65 | + |
| 66 | +<div align="center"> |
| 67 | + <h3 style="color: #4CAF50;">Total Visitors</h3> |
| 68 | + <img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/> |
| 69 | +</div> |
0 commit comments