|
| 1 | +# Terraform Template - Azure Data Factory |
| 2 | + |
| 3 | +Costa Rica |
| 4 | + |
| 5 | +[](https://github.com/) |
| 6 | +[brown9804](https://github.com/brown9804) |
| 7 | + |
| 8 | +Last updated: 2026-02-11 |
| 9 | + |
| 10 | +------------------------------------------ |
| 11 | + |
| 12 | +> This template contains Terraform configurations to create an Azure Data Factory instance with a system-assigned managed identity. |
| 13 | +
|
| 14 | +> [!NOTE] |
| 15 | +> |
| 16 | +> - This template creates the Resource Group for you. |
| 17 | +> - Azure Data Factory names are globally unique. If you disable `append_random_suffix`, you may hit `DataFactoryNameInUse` and need to change `data_factory_name`. |
| 18 | +
|
| 19 | +<div align="center"> |
| 20 | + <img width="650" alt="image" src="https://github.com/user-attachments/assets/49954b0e-348c-4b6f-bb84-c5939452ae17" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/> |
| 21 | +</div> |
| 22 | + |
| 23 | +<div align="center"> |
| 24 | + <img width="650" alt="image" src="https://github.com/user-attachments/assets/6106e50d-0c7e-4eab-8845-12bc6ee10069" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/> |
| 25 | +</div> |
| 26 | + |
| 27 | +<div align="center"> |
| 28 | + <img width="650" alt="image" src="https://github.com/user-attachments/assets/966f05b9-3a25-467c-9ca8-659c15a1cf3b" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/> |
| 29 | +</div> |
| 30 | + |
| 31 | +## File Descriptions |
| 32 | + |
| 33 | +- **main.tf**: Creates the Resource Group and Azure Data Factory. |
| 34 | +- **variables.tf**: Defines the input variables used in the Terraform configuration. |
| 35 | +- **provider.tf**: Configures the Azure provider to interact with Azure resources. |
| 36 | +- **terraform.tfvars**: Provides example values for the variables defined in `variables.tf`. |
| 37 | +- **outputs.tf**: Defines outputs such as the Data Factory ID and managed identity principal ID. |
| 38 | + |
| 39 | +## Variables |
| 40 | + |
| 41 | +| Variable Name | Description | Type | Example Value | |
| 42 | +| --- | --- | --- | --- | |
| 43 | +| `resource_group_name` | Resource Group name to create/deploy into. | string | `"rg-analytics-dev"` | |
| 44 | +| `location` | Azure region for the deployment. | string | `"eastus"` | |
| 45 | +| `data_factory_name` | Base Azure Data Factory name. If random suffix is enabled, final name is `<base>-<suffix>`. | string | `"adf-analytics-dev"` | |
| 46 | +| `append_random_suffix` | Append a random suffix to avoid global name collisions. | bool | `true` | |
| 47 | +| `random_suffix_length` | Length of the random suffix when enabled. | number | `6` | |
| 48 | +| `public_network_enabled` | Enable/disable public network access for Data Factory. | bool | `true` | |
| 49 | +| `tags` | Tags applied to resources. | map(string) | `{ "env": "dev" }` | |
| 50 | + |
| 51 | +## Usage |
| 52 | + |
| 53 | +1. Authenticate: |
| 54 | + |
| 55 | + ```sh |
| 56 | + az login |
| 57 | + ```` |
| 58 | + |
| 59 | + ```sh |
| 60 | + az account show |
| 61 | + # If needed: |
| 62 | + az account set --subscription "<subscription-id-or-name>" |
| 63 | + ``` |
| 64 | + |
| 65 | +3. Initialize: |
| 66 | + |
| 67 | + ```sh |
| 68 | + terraform init -upgrade |
| 69 | + ``` |
| 70 | + |
| 71 | +4. Validate and plan: |
| 72 | + |
| 73 | + ```sh |
| 74 | + terraform validate |
| 75 | + terraform plan |
| 76 | + ``` |
| 77 | + |
| 78 | +5. Apply: |
| 79 | + |
| 80 | + ```sh |
| 81 | + terraform apply -auto-approve |
| 82 | + ``` |
| 83 | + |
| 84 | +<!-- START BADGE --> |
| 85 | +<div align="center"> |
| 86 | + <img src="https://img.shields.io/badge/Total%20views-1706-limegreen" alt="Total views"> |
| 87 | + <p>Refresh Date: 2026-02-11</p> |
| 88 | +</div> |
| 89 | +<!-- END BADGE --> |
0 commit comments