|
| 1 | +# Terraform Template - Azure Firewall |
| 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 Firewall, including a public IP and required subnet configuration. |
| 13 | +
|
| 14 | +> [!NOTE] |
| 15 | +> The subnet used for Azure Firewall **must** be named `AzureFirewallSubnet` and sized at least /26. |
| 16 | +
|
| 17 | +<p align="center"> |
| 18 | + <img width="800" alt="image" src="https://github.com/user-attachments/assets/7614ce31-c57d-41ce-a9f2-307c29cb0f3d"> |
| 19 | +</p> |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +## File Descriptions |
| 24 | + |
| 25 | +- **main.tf**: Contains the main configuration for creating the Azure Firewall and its supporting resources. |
| 26 | +- **variables.tf**: Defines the input variables used in the Terraform configuration. |
| 27 | +- **terraform.tfvars**: Provides default values for the variables defined in `variables.tf`. |
| 28 | +- **outputs.tf**: Defines the outputs such as Firewall ID and public IP address. |
| 29 | + |
| 30 | +## Variables |
| 31 | + |
| 32 | +| Variable Name | Description | Type | Example Value | |
| 33 | +|---------------------- |--------------------------------------------------|--------|-----------------------------| |
| 34 | +| `resource_group_name` | The name of the resource group | string | `"my-firewall-rg"` | |
| 35 | +| `location` | The Azure region to deploy resources | string | `"eastus"` | |
| 36 | +| `firewall_name` | The name of the Azure Firewall | string | `"my-azfw"` | |
| 37 | +| `public_ip_name` | The name of the public IP address for the firewall | string | `"my-azfw-pip"` | |
| 38 | +| `subnet_id` | The ID of the subnet for the Azure Firewall | string | `".../subnets/AzureFirewallSubnet"` | |
| 39 | + |
| 40 | +## Usage |
| 41 | + |
| 42 | +1. Clone the repository and navigate to the firewall directory. |
| 43 | +2. Update the `terraform.tfvars` file with your values. |
| 44 | +3. Initialize and apply the Terraform configuration: |
| 45 | + |
| 46 | +```bash |
| 47 | +terraform init |
| 48 | +terraform plan |
| 49 | +terraform apply |
| 50 | +``` |
| 51 | + |
| 52 | +## Outputs |
| 53 | + |
| 54 | +| Output Name | Description | |
| 55 | +|---------------------|---------------------------------------------| |
| 56 | +| `firewall_id` | The ID of the Azure Firewall | |
| 57 | +| `firewall_public_ip`| The public IP address of the Azure Firewall | |
| 58 | + |
| 59 | +<div align="center"> |
| 60 | + <h3 style="color: #4CAF50;">Total Visitors</h3> |
| 61 | + <img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/> |
| 62 | +</div> |
0 commit comments