0% found this document useful (0 votes)
71 views3 pages

1.1 Creating Container Apps Using Terraform

The document outlines the Terraform configuration for deploying Azure resources, including a resource group, a log analytics workspace, a container app environment, and a container app. It specifies settings such as location, SKU, retention days, and container specifications like CPU and memory. Additionally, it provides a link to a GitHub repository for further reference on deploying backend and frontend applications in Azure Container Apps using Terraform.

Uploaded by

maheshsekar25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views3 pages

1.1 Creating Container Apps Using Terraform

The document outlines the Terraform configuration for deploying Azure resources, including a resource group, a log analytics workspace, a container app environment, and a container app. It specifies settings such as location, SKU, retention days, and container specifications like CPU and memory. Additionally, it provides a link to a GitHub repository for further reference on deploying backend and frontend applications in Azure Container Apps using Terraform.

Uploaded by

maheshsekar25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

resource "azurerm_resource_group" "rg" {

name = "rg-containerapps-terraform"
location = "westeurope"
}

resource "azurerm_log_analytics_workspace" "workspace" {


name = "workspace-aca"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku = "PerGB2018"
retention_in_days = 30
}

resource "azurerm_container_app_environment" "aca_environment" {


name = "aca-environment"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
log_analytics_workspace_id = azurerm_log_analytics_workspace.workspace.id
}
resource "azurerm_container_app" "aca" {
name = "aca-app-demo"
container_app_environment_id =
azurerm_container_app_environment.aca_environment.id
resource_group_name = azurerm_resource_group.rg.name
revision_mode = "Single"

template {
container {
name = "helloworld-app"
image = "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest"
cpu = 0.25
memory = "0.5Gi"
}
}

ingress {
allow_insecure_connections = false
external_enabled = true
target_port = 80
transport = "auto"

traffic_weight {
latest_revision = true
percentage = 100
}
}
}
Deploying backend &
frontend in Container
Apps using Terraform

https://github.com/HoussemDellai/aca-course/tree/main/04_create_aca_apps_terraform

You might also like