@@ -49,14 +49,6 @@ resource "azurerm_storage_account" "sa" {
4949 account_replication_type = " LRS"
5050}
5151
52- resource "azurerm_service_plan" "sp" {
53- name = var. service_plan_name
54- resource_group_name = azurerm_resource_group. rg . name
55- location = azurerm_resource_group. rg . location
56- os_type = " Linux"
57- sku_name = " B1"
58- }
59-
6052resource "azurerm_log_analytics_workspace" "law" {
6153 name = " touristLogAnalyticsWorkspace"
6254 location = azurerm_resource_group. rg . location
@@ -72,6 +64,13 @@ resource "azurerm_container_app_environment" "env" {
7264 logs_destination = " log-analytics"
7365 log_analytics_workspace_id = azurerm_log_analytics_workspace. law . id
7466
67+ workload_profile {
68+ name = " Consumption"
69+ workload_profile_type = " Consumption"
70+ maximum_count = 1
71+ minimum_count = 0
72+ }
73+
7574 identity {
7675 type = " SystemAssigned"
7776 }
@@ -90,6 +89,7 @@ resource "azurerm_container_app" "app" {
9089 resource_group_name = azurerm_resource_group. rg . name
9190 revision_mode = " Single"
9291 max_inactive_revisions = 5
92+ workload_profile_name = " Consumption"
9393 tags = local. tags
9494
9595 identity {
@@ -109,16 +109,16 @@ resource "azurerm_container_app" "app" {
109109
110110 registry {
111111 identity = " system-environment"
112- server = azurerm_container_registry. cr . login_server
112+ server = azurerm_container_registry. cr . login_server
113113 }
114114
115115 template {
116116 container {
117117 command = []
118- args = [ var . mode ]
119- cpu = 2
118+ args = [var . mode ]
119+ cpu = 4
120120 image = " ${ azurerm_container_registry . cr . login_server } /tourist:${ var . image_tag } "
121- memory = " 4Gi "
121+ memory = " 8Gi "
122122 name = " tourist"
123123 env {
124124 name = " X_API_KEY"
0 commit comments