From a6bf9b38918ebf70a199f73fbc8c3730ddee83a9 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 5 May 2026 08:17:06 +0000 Subject: [PATCH] fix(azure): fix PostgreSQL SKU format and ACR login resource group - infra.bicep: correct SKU format from B_Standard_B1ms to Standard_B1ms (Azure Flexible Server uses Standard_* prefix, not B_*); update tier detection logic accordingly (contains '_B' -> Burstable) - 2-build-deploy.sh: add --resource-group to az acr login to avoid accidentally matching an ACR with the same name in a different RG - config.sh.example: update POSTGRES_SKU default to Standard_B1ms Co-Authored-By: Claude Sonnet 4.6 --- azure/2-build-deploy.sh | 2 +- azure/config.sh.example | 4 ++-- azure/infra.bicep | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/azure/2-build-deploy.sh b/azure/2-build-deploy.sh index 15d2f6f1..52e554e8 100755 --- a/azure/2-build-deploy.sh +++ b/azure/2-build-deploy.sh @@ -93,7 +93,7 @@ echo "" # ── Login a l'ACR ───────────────────────────────────────────────────────────── echo "→ Login a l'ACR..." -az acr login --name "$ACR_NAME" +az acr login --name "$ACR_NAME" --resource-group "$RESOURCE_GROUP" # ── Build de la imatge Docker ───────────────────────────────────────────────── echo "→ Build de la imatge Docker..." diff --git a/azure/config.sh.example b/azure/config.sh.example index faf88bfd..b02a565d 100644 --- a/azure/config.sh.example +++ b/azure/config.sh.example @@ -78,8 +78,8 @@ POSTGRES_ADMIN_PASSWORD="" # Usuari administrador de PostgreSQL (per defecte: mirofish) POSTGRES_ADMIN_USER="mirofish" -# SKU de PostgreSQL: B_Standard_B1ms (dev/test) | GP_Standard_D2s_v3 (producció) -POSTGRES_SKU="B_Standard_B1ms" +# SKU de PostgreSQL: Standard_B1ms (dev/test) | Standard_D2s_v3 (producció) +POSTGRES_SKU="Standard_B1ms" # ── Storage ─────────────────────────────────────────────────────────────────── # Opció A — Compte existent (ex: stgraphiti16852 que ja té caddydata, neo4jdata) diff --git a/azure/infra.bicep b/azure/infra.bicep index 81e0e8e2..3262dfcb 100644 --- a/azure/infra.bicep +++ b/azure/infra.bicep @@ -23,8 +23,8 @@ param postgresAdminPassword string @description('Usuari administrador de PostgreSQL') param postgresAdminUser string = 'mirofish' -@description('SKU de PostgreSQL (B_Standard_B1ms per dev; GP_Standard_D2s_v3 per pro)') -param postgresSku string = 'B_Standard_B1ms' +@description('SKU de PostgreSQL (Standard_B1ms per dev; Standard_D2s_v3 per pro)') +param postgresSku string = 'Standard_B1ms' @description('Nom del Storage Account existent (o buit per crear-ne un de nou: store)') param storageAccountName string = '' @@ -102,7 +102,7 @@ resource postgresServer 'Microsoft.DBforPostgreSQL/flexibleServers@2023-06-01-pr location: location sku: { name: postgresSku - tier: startsWith(postgresSku, 'B_') ? 'Burstable' : 'GeneralPurpose' + tier: contains(postgresSku, '_B') ? 'Burstable' : (contains(postgresSku, '_D') || contains(postgresSku, '_E') ? 'GeneralPurpose' : 'MemoryOptimized') } properties: { administratorLogin: postgresAdminUser