Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
330 changes: 122 additions & 208 deletions .github/workflows/infrastructure.yml

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions .github/workflows/release-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ jobs:
id: validate
run: |
ENV="${{ matrix.environment }}"
PROJECT="whatssummarize"
RG="rg-${PROJECT}-${ENV}"
ORG="nl"
PROJECT="convolens"
# Naming pattern per ADR-0027 (no region suffix): {org}-{env}-{project}-{type}
BASE="${ORG}-${ENV}-${PROJECT}"
RG="${BASE}-rg"

echo "=============================================="
echo "Validating Azure Resources for Release"
Expand All @@ -112,8 +115,7 @@ jobs:
fi

# Check Key Vault
KV_NAME="kv${PROJECT}${ENV}"
KV_NAME="${KV_NAME//-/}"
KV_NAME="${BASE}-kv"
echo "Checking Key Vault: $KV_NAME..."
if ! az keyvault show --name "$KV_NAME" &>/dev/null; then
echo "❌ Key Vault not found"
Expand All @@ -133,9 +135,8 @@ jobs:
done
fi

# Check Storage Account
STORAGE_NAME="st${PROJECT}${ENV}"
STORAGE_NAME="${STORAGE_NAME//-/}"
# Check Storage Account (alphanumeric only)
STORAGE_NAME="${ORG}${ENV}${PROJECT}st"
echo "Checking Storage Account: $STORAGE_NAME..."
if ! az storage account show --name "$STORAGE_NAME" --resource-group "$RG" &>/dev/null; then
echo "❌ Storage account not found"
Expand All @@ -146,7 +147,7 @@ jobs:
fi

# Check Azure OpenAI
OPENAI_NAME="oai-${PROJECT}-${ENV}"
OPENAI_NAME="${BASE}-oai"
echo "Checking Azure OpenAI: $OPENAI_NAME..."
if ! az cognitiveservices account show --name "$OPENAI_NAME" --resource-group "$RG" &>/dev/null; then
echo "⚠️ Azure OpenAI not found (optional)"
Expand All @@ -164,7 +165,7 @@ jobs:
fi

# Check Cosmos DB
COSMOS_NAME="cosmos-${PROJECT}-${ENV}"
COSMOS_NAME="${BASE}-cosmos"
echo "Checking Cosmos DB: $COSMOS_NAME..."
if ! az cosmosdb show --name "$COSMOS_NAME" --resource-group "$RG" &>/dev/null; then
echo "⚠️ Cosmos DB not found (optional)"
Expand All @@ -174,7 +175,7 @@ jobs:
fi

# Check Redis
REDIS_NAME="redis-${PROJECT}-${ENV}"
REDIS_NAME="${BASE}-redis"
echo "Checking Redis Cache: $REDIS_NAME..."
if ! az redis show --name "$REDIS_NAME" --resource-group "$RG" &>/dev/null; then
echo "⚠️ Redis Cache not found (optional)"
Expand All @@ -184,7 +185,7 @@ jobs:
fi

# Check App Insights
APPI_NAME="appi-${PROJECT}-${ENV}"
APPI_NAME="${BASE}-appi"
echo "Checking Application Insights: $APPI_NAME..."
if ! az monitor app-insights component show --app "$APPI_NAME" --resource-group "$RG" &>/dev/null; then
echo "❌ Application Insights not found"
Expand All @@ -194,8 +195,8 @@ jobs:
echo "✅ Application Insights exists"
fi

# Check Container Apps
CAE_NAME="cae-${PROJECT}-${ENV}"
# Check Container Apps (names follow ${BASE}-{cae,api} per infra/terraform/env/{env}/main.tf)
CAE_NAME="${BASE}-cae"
echo "Checking Container Apps Environment: $CAE_NAME..."
if ! az containerapp env show --name "$CAE_NAME" --resource-group "$RG" &>/dev/null; then
echo "❌ Container Apps Environment not found"
Expand All @@ -205,10 +206,10 @@ jobs:
echo "✅ Container Apps Environment exists"

# Check API app
CA_NAME="ca-${PROJECT}-${ENV}-api"
CA_NAME="${BASE}-api"
if ! az containerapp show --name "$CA_NAME" --resource-group "$RG" &>/dev/null; then
echo "❌ API Container App not found"
MISSING="${MISSING}container-app-api,"
MISSING="${MISSING}container-apps-api,"
PASSED="false"
else
echo "✅ API Container App exists"
Expand Down
8 changes: 3 additions & 5 deletions docs/AZURE_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,9 @@ az role assignment list --assignee <client-id>
# List federated credentials
az ad app federated-credential list --id <app-id>

# Test deployment (dry run)
az deployment group what-if \
--resource-group rg-whatssummarize-dev \
--template-file infra/bicep/main.bicep \
--parameters infra/parameters/dev.bicepparam
# Test deployment (dry run) — Terraform
terraform -chdir=infra/terraform/env/dev init -backend-config=backend.hcl
terraform -chdir=infra/terraform/env/dev plan
```

## Migration from Legacy Credentials
Expand Down
Loading
Loading