Skip to content

Commit 4aa76d4

Browse files
committed
Use workload v2
1 parent df597b6 commit 4aa76d4

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

deploy/azure/main.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
6052
resource "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"

src/tourist/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5.2"
1+
__version__ = "0.5.3"

0 commit comments

Comments
 (0)