Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Each sample is a self-contained project with its own README, Azure CLI scripts a
| Function App with Service Bus ([.NET](./samples/function-app-service-bus/dotnet/README.md)) | An Azure Functions app on an App Service plan that exchanges messages through Service Bus queues: an HTTP trigger sends greetings and a queue trigger consumes them, connecting with either a connection string or a managed identity. |
| Web App with Cosmos DB for MongoDB API ([Python](./samples/web-app-cosmosdb-mongodb-api/python/README.md), [.NET](./samples/web-app-cosmosdb-mongodb-api/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App with regional VNet integration, storing activities in the `activities` collection of an Azure Cosmos DB for MongoDB account reached through a private endpoint. |
| Web App with CosmosDB for NoSQL API ([Python](./samples/web-app-cosmosdb-nosql-api/python/README.md), [.NET](./samples/web-app-cosmosdb-nosql-api/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App, storing activities as JSON items in the `activities` container of an Azure Cosmos DB for NoSQL database partitioned by user, and reaching the account with its key or with a system-assigned or user-assigned managed identity through Microsoft Entra ID; deployed with Azure CLI scripts, Bicep or Terraform. |
| Web App with Azure Managed Redis ([Python](./samples/web-app-managed-redis/python/README.md), [.NET](./samples/web-app-managed-redis/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App, storing activities as the fields of a Redis hash in the `default` database of an Azure Managed Redis cluster over TLS, and reaching it with its access key or with a system-assigned or user-assigned managed identity through Microsoft Entra ID and the database's `default` access policy; deployed with Azure CLI scripts, Bicep or Terraform. |
| Web App with Managed Identities ([Python](./samples/web-app-managed-identity/python/README.md), [.NET](./samples/web-app-managed-identity/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App, storing each activity as a blob in an `activities` container and accessing Blob Storage through a user-assigned or system-assigned managed identity rather than connection strings. |
| Web App with SQL Database ([Python](./samples/web-app-sql-database/python/README.md), [.NET](./samples/web-app-sql-database/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App, storing activities in an Azure SQL Database. The connection string and the HTTPS certificate are read from Azure Key Vault, and an API endpoint verifies the Key Vault certificate. |
| Web App with PostgreSQL Database ([Python](./samples/web-app-postgresql-flexible-server/python/README.md), [.NET](./samples/web-app-postgresql-flexible-server/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App, storing activities in an Azure Database for PostgreSQL flexible server injected into a virtual network (delegated subnet and private DNS zone), with the database and application user created by the deploy scripts. |
Expand Down
19 changes: 18 additions & 1 deletion run-samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ SAMPLES=(
"samples/web-app-cosmosdb-nosql-api/python|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/validate.sh"
"samples/web-app-cosmosdb-nosql-api/dotnet|MANAGED_IDENTITY_TYPE=SystemAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash scripts/validate.sh"
"samples/web-app-cosmosdb-nosql-api/dotnet|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/validate.sh"
"samples/web-app-managed-redis/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh && bash scripts/query-telemetry.sh && bash scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh && bash scripts/query-telemetry.sh && bash scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/python|MANAGED_IDENTITY_TYPE=SystemAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash scripts/validate.sh"
"samples/web-app-managed-redis/python|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/validate.sh"
"samples/web-app-managed-redis/dotnet|MANAGED_IDENTITY_TYPE=SystemAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash scripts/validate.sh"
"samples/web-app-managed-redis/dotnet|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash scripts/validate.sh"
"samples/web-app-managed-identity/python|bash scripts/user-assigned.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh && bash scripts/query-telemetry.sh && bash scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-identity/dotnet|bash scripts/user-assigned.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh && bash scripts/query-telemetry.sh && bash scripts/query-logs-and-metrics.sh"
"samples/web-app-sql-database/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh && bash scripts/query-telemetry.sh && bash scripts/query-logs-and-metrics.sh"
Expand Down Expand Up @@ -82,6 +88,10 @@ TERRAFORM_SAMPLES=(
"samples/web-app-cosmosdb-nosql-api/python/terraform|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-cosmosdb-nosql-api/dotnet/terraform|MANAGED_IDENTITY_TYPE=SystemAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-cosmosdb-nosql-api/dotnet/terraform|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/python/terraform|MANAGED_IDENTITY_TYPE=SystemAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/python/terraform|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/dotnet/terraform|MANAGED_IDENTITY_TYPE=SystemAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/dotnet/terraform|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-identity/python/terraform|bash deploy.sh|bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-identity/dotnet/terraform|bash deploy.sh|bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-sql-database/python/terraform|bash deploy.sh|bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
Expand Down Expand Up @@ -120,6 +130,10 @@ BICEP_SAMPLES=(
"samples/web-app-cosmosdb-nosql-api/python/bicep|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-cosmosdb-nosql-api/dotnet/bicep|MANAGED_IDENTITY_TYPE=SystemAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-cosmosdb-nosql-api/dotnet/bicep|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/python/bicep|MANAGED_IDENTITY_TYPE=SystemAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/python/bicep|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/dotnet/bicep|MANAGED_IDENTITY_TYPE=SystemAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=SystemAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-redis/dotnet/bicep|MANAGED_IDENTITY_TYPE=UserAssigned bash deploy.sh|MANAGED_IDENTITY_TYPE=UserAssigned bash ../scripts/validate.sh && bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-identity/python/bicep|bash deploy.sh|bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-managed-identity/dotnet/bicep|bash deploy.sh|bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
"samples/web-app-mysql-flexible-server/python/bicep|bash deploy.sh|bash ../scripts/query-telemetry.sh && bash ../scripts/query-logs-and-metrics.sh"
Expand Down Expand Up @@ -193,8 +207,11 @@ ARM64_SAMPLE_DIRS=(

# Fail loudly if an entry no longer matches a registered sample: a rename would otherwise
# silently drop that sample's arm64 coverage while CI stays green.
# The registered folders go to grep -q as a here-string, not a pipe: under pipefail the writers die of SIGPIPE
# once grep -q has its match early in a long list, and the match reads as a failure (as in build-matrix.sh).
_registered_dirs=$(printf '%s\n' "${ALL_SAMPLES[@]}" | cut -d'|' -f1 | sed -E 's#/(terraform|bicep)$##')
for _arm64_dir in "${ARM64_SAMPLE_DIRS[@]}"; do
if ! printf '%s\n' "${ALL_SAMPLES[@]}" | cut -d'|' -f1 | sed -E 's#/(terraform|bicep)$##' | grep -qxF "$_arm64_dir"; then
if ! grep -qxF "$_arm64_dir" <<<"$_registered_dirs"; then
echo >&2 "ARM64_SAMPLE_DIRS entry '$_arm64_dir' matches no registered sample - fix the path or remove the entry."
exit 1
fi
Expand Down
Loading
Loading