An open API service indexing awesome lists of open source software.

https://github.com/danielbmeireles/aca-example

Azure Container App deployment via Terraform, in one single file 💙
https://github.com/danielbmeireles/aca-example

azure azurecontainerapps terraform

Last synced: 4 months ago
JSON representation

Azure Container App deployment via Terraform, in one single file 💙

Awesome Lists containing this project

README

          

# Azure Container App in One File

![ACA example scenarios](
https://learn.microsoft.com/en-us/azure/container-apps/media/overview/azure-container-apps-example-scenarios.png)

## Table of Contents

- [Description](#description)
- [Requirements](#requirements)
- [Providers](#providers)
- [Modules](#modules)
- [Resources](#resources)
- [Inputs](#inputs)
- [Outputs](#outputs)

## Description

This Terraform project deploys a basic Azure Container App infrastructure running a "Hello World" application. It creates a complete container app environment including:

- Resource group for organizing Azure resources
- Log Analytics workspace for monitoring and diagnostics
- Container App environment for hosting containerized applications
- Container App running a sample quickstart image with health probes (startup, liveness, and readiness)

The deployed container app is publicly accessible via HTTPS with auto-scaling capabilities (1-3 replicas) and includes comprehensive health monitoring to ensure high availability.

---

# Terraform Configuration

## Requirements

| Name | Version |
| ------------------------------------------------------------------------- | ------- |
| [terraform](#requirement\_terraform) | >= 1.0 |
| [azurerm](#requirement\_azurerm) | ~> 4.50 |

## Providers

| Name | Version |
| ------------------------------------------------------------- | ------- |
| [azurerm](#provider\_azurerm) | ~> 4.50 |

## Modules

No modules.

## Resources

| Name | Type |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| [azurerm_container_app.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app) | resource |
| [azurerm_container_app_environment.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app_environment) | resource |
| [azurerm_log_analytics_workspace.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_workspace) | resource |
| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource |

## Inputs

| Name | Description | Type | Default | Required |
| ------------------------------------------------------------------- | ------------------------------------ | ------------- | ------------------------------------------------- | :------: |
| [environment](#input\_environment) | Environment name for resource naming | `string` | `"demo"` | no |
| [location](#input\_location) | Azure region for resources | `string` | `"West Europe"` | no |
| [project](#input\_project) | Project name for resource naming | `string` | `"containerapp"` | no |
| [tags](#input\_tags) | Tags to apply to resources | `map(string)` |

{
"ManagedBy": "Terraform"
}
| no |

## Outputs

| Name | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [container\_app\_fqdn](#output\_container\_app\_fqdn) | Fully qualified domain name of the Container App |
| [container\_app\_name](#output\_container\_app\_name) | Name of the Container App |
| [container\_app\_url](#output\_container\_app\_url) | URL to access the Container App |
| [resource\_group\_name](#output\_resource\_group\_name) | Name of the resource group |

---

Made with 💙 with [Terraform](https://www.terraform.io/) and [VS Code](https://code.visualstudio.com/)