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 <noreply@anthropic.com>
This commit is contained in:
parent
c032580c3b
commit
a6bf9b3891
|
|
@ -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..."
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ POSTGRES_ADMIN_PASSWORD="<contrasenya-segura-postgres>"
|
|||
# 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)
|
||||
|
|
|
|||
|
|
@ -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: <projectName>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
|
||||
|
|
|
|||
Loading…
Reference in New Issue