Skip to content

Commit 1434d2b

Browse files
Port the Vacation Planner web app samples to .NET 10 (#120)
* Point Terraform samples at azure.localhost.localstack.cloud:4566 Use the Azure-scoped emulator host as the azurerm provider metadata_host in every sample's providers.tf and in the Terraform READMEs that quote it, so the documented configuration matches what the deploy scripts apply. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Add .NET 10 ports of the custom-image and managed-identity web app samples Introduce the ASP.NET Core Razor Pages port of the Vacation Planner used by every web-app sample: one Index page with TempData flash messages, a Delete page keyed on the store id, an IActivityStore abstraction initialized at startup, a /health endpoint, and Kestrel binding to the PORT that App Service and the emulator inject. The custom-image variant serves the same info page and /api/status from a multi-stage sdk:10.0 -> aspnet:10.0 image; the managed-identity variant stores one blob per activity through DefaultAzureCredential. Deployment artifacts mirror the Python siblings: DOTNETCORE|10.0 code deployment with the project source zipped for the Oryx build, dotnet_version in Terraform, runtimeName 'dotnetcore' in Bicep, unchanged WEBSITES_PORT values and validation scripts. Register both samples in run-samples.sh, link them from the root README and normalize line endings for C# sources. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Add the .NET 10 port of the SQL Database web app sample; describe every sample in the root README The Vacation Planner reads its SQL connection string from the Key Vault secret (falling back to SQL_* variables or a Microsoft Entra token), serves HTTPS on port 8443 with the Key Vault certificate, and exposes /update/{id} and /api/certificate like the Python sample; get-web-app-url.sh now fails when the 8443 endpoint or its certificate cannot be retrieved instead of comparing two empty thumbprints. InvariantGlobalization is dropped from the template because Microsoft.Data.SqlClient cannot open connections in invariant mode. The root README outline gains an introduction, a longer description per sample, the implementation language in parentheses, and separate Python and .NET links for the web-app samples. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Add the .NET 10 port of the MySQL flexible server web app sample MySqlConnector store with the same idempotent DDL, md5 ids, 30x2s startup retry and TLS-without-verification semantics (MYSQL_SSL) as the Python sample; artifacts switch to DOTNETCORE|10.0 with a source zip for the Oryx build, dotnet_version in Terraform and 'dotnetcore' in Bicep. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Add the .NET 10 port of the PostgreSQL flexible server web app sample Npgsql store with the same DDL, indexes, md5 ids, 30x2s startup retry and libpq "prefer" TLS semantics as the Python sample; artifacts switch to DOTNETCORE|10.0 with a source zip for the Oryx build, dotnet_version in Terraform and 'dotnetcore' in Bicep. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Add the .NET 10 port of the Cosmos DB for MongoDB web app sample MongoDB.Driver store keeping the {_id, username, activity, timestamp} documents, md5 ids and the three indexes of the Python sample, created once at startup instead of on every operation; artifacts switch to DOTNETCORE|10.0 with a source zip for the Oryx build, dotnet_version in Terraform and 'dotnetcore' in Bicep. call-web-app.sh probes container port 8000, the port this sample sets through WEBSITES_PORT, instead of 80. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Add the .NET 10 port of the Cosmos DB for NoSQL web app sample Microsoft.Azure.Cosmos store in Gateway mode (the emulator exposes the account endpoint over HTTPS only), keeping the {id, username, activity, timestamp} items partitioned by /username, the 400 RU container created on demand and id-keyed deletes of the Python sample; scripts-only deployment as in the Python sibling, switched to DOTNETCORE:10.0 with a source zip. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Log requests and store operations in the .NET web app samples The port kept only the startup and store-initialization logs, so nothing appeared in the container log while adding, updating or deleting an activity — unlike the Python samples, which log a gunicorn access line per request, the store operation (with the affected documents) and an application-level "Activity added/updated" line. Add the same three layers to every .NET sample: a one-line access log ("POST / -> 302 in 45.3ms") from a small middleware, the store operation with its documents or affected-row counts, and "Activity added/updated/deleted" from the page handlers. Each store logs at the granularity its Python counterpart does: full documents for Cosmos DB (MongoDB and NoSQL APIs), blob names and sizes for Blob Storage, row counts and ids for SQL Database, retrieval counts for the MySQL and PostgreSQL flexible servers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Update the architecture diagram of the Cosmos DB for MongoDB .NET sample The .NET sample now carries its own Visio drawing and rendered PNG instead of the copies inherited from the Python sibling. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Unify the SQL Database call script name and register the NoSQL .NET sample in CI The .NET SQL Database sample's get-web-app-url.sh becomes call-web-app.sh, the name every other sample uses and the one its Python sibling's README already documented; the Python script is renamed with it so both run-samples.sh entries resolve. The renamed .NET copy keeps the strict certificate checks (a failed call, an empty thumbprint or a missing TLS certificate now exit 1 instead of comparing two empty strings). Also from manual validation of the samples: the Terraform deployments use the local-* resource naming of the script deployments and pass secret_name through, and the validate/README instructions show how to read the web app host name. Register samples/web-app-cosmosdb-nosql-api/dotnet in run-samples.sh; it was the only validated .NET web app missing from the matrix, which now builds 17 web-app-*/dotnet jobs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Fix the NoSQL deploy script's working directory and the certificate subject check Two CI failures that survived four re-runs were deterministic, not flaky: - web-app-cosmosdb-nosql-api/scripts/deploy.sh did `cd "../src"` without anchoring to the script's own location, so it worked when run from scripts/ but not as `bash scripts/deploy.sh` from the sample root, which is how run-samples.sh invokes it: `cd: ../src: No such file or directory`. Both language variants now set CURRENT_DIR the way every other sample does. - The SQL Database certificate check compared distinguished names literally, so OpenSSL 3's "CN = sample-web-app-sql" never matched Key Vault's "CN=sample-web-app-sql". Both are normalized before comparing (leading "/" and the spaces around "=" of the OpenSSL 1 and 3 spellings), and the match is a fixed-string one so a CN with regex metacharacters cannot misfire. The Python copy of that check also stops reporting success when there is nothing to check: its app only serves HTTPS on 8443 when started directly, so under gunicorn the old code compared two empty thumbprints and called them equal. It now says the port is not served and skips. From the Copilot review: the NoSQL delete flash message reads "Activity deleted." like the Python sample, and the unused Docker helper functions are gone from the custom-image call script. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Retry a stalled emulator start and a failed sample once before failing the job Of the 11 jobs that failed on the first run of the samples workflow, 8 were in samples this branch does not touch and went green when re-run by hand: two never reached the sample at all (`localstack wait -t 600` expired while ~80 jobs competed for runner I/O and image pulls) and one hit a transient 500 from the emulator while creating a MySQL firewall rule. Automate what the manual re-runs were doing: - the emulator start gets one clean retry, printing the container's last log lines when the first wait expires; - the sample runs with continue-on-error and, on failure, once more against a freshly restarted emulator, because the deploy scripts are not idempotent and would otherwise re-run against half-provisioned resources. A genuinely broken sample fails both attempts, so it still fails the job. The job also gets a 90-minute bound: a sample takes 10-25 minutes, a retry doubles the worst case, and a hung deployment would otherwise hold a runner for GitHub's 6-hour default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Survive the emulator's transient firewall-rule 500 and a stalled emulator start The samples workflow came back with 2 failures out of 78 (from 11), and both were emulator-side transients rather than sample defects: - web-app-mysql-flexible-server/dotnet failed twice, both times on `az mysql flexible-server firewall-rule create` answering 500. The Azure CLI's own retries all land within ~5 seconds of each other, which is too early: the PUT succeeds once the server finishes provisioning. The create is now retried five times at 10-second intervals in the MySQL and PostgreSQL samples (both languages, since the blocks were identical), and a persistent failure warns instead of aborting: the rule only governs public network access, which the emulator does not enforce, and the database bootstrap a few lines later fails loudly if the server is genuinely unreachable. - aci-blob-storage/python/bicep failed on an arm64 runner because the emulator never became ready - the container logged nothing for the last ten minutes of each 600-second wait, so the boot had stalled rather than slowed. The readiness retry now makes three 400-second attempts instead of two 600-second ones: the same overall budget, one more chance, and a stalled container is replaced sooner. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 7bbd53a commit 1434d2b

416 files changed

Lines changed: 34301 additions & 89 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
*.yml text eol=lf
33
*.bicep text eol=lf
44
*.tf text eol=lf
5+
*.cs text eol=lf
6+
*.csproj text eol=lf
7+
*.cshtml text eol=lf

‎.github/workflows/run-samples.yml‎

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292
strategy:
9393
fail-fast: false
9494
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
95+
# A sample takes ~10-25 minutes; the bound covers a retry and stops a hung deployment from
96+
# holding a runner for GitHub's 6-hour default.
97+
timeout-minutes: 90
9598
# ubuntu-22.04 for amd64, ubuntu-22.04-arm for arm64 — the matrix carries the label.
9699
# GitHub-hosted arm64 runners are free for public repositories.
97100
runs-on: ${{ matrix.runner }}
@@ -191,10 +194,30 @@ jobs:
191194
# I/O pushed some starts past a 120s budget - and, on the slowest runners,
192195
# occasionally past 300s as well. A healthy emulator still returns as soon as
193196
# it is ready, so a larger timeout costs nothing on the happy path.
197+
# A start that never becomes ready is retried on a fresh container (see below).
194198
run: |
195199
source .venv/bin/activate
196-
python -m localstack_cli.cli.main start -d
197-
python -m localstack_cli.cli.main wait -t 600
200+
# Even at 600s the wait occasionally expires: ~80 concurrent jobs compete for runner I/O
201+
# and image pulls, and a start that stalls failed the job before the sample ever ran.
202+
# Give it one clean retry, and print the container's logs when the first attempt expires.
203+
# A healthy start reports ready in well under a minute, so a wait that reaches the
204+
# timeout means the boot has stalled rather than slowed: observed on an arm64 runner,
205+
# where the container logged nothing for the last ten minutes of the wait. Three shorter
206+
# attempts therefore beat two long ones - same overall budget, one more chance, and a
207+
# stalled container is replaced sooner.
208+
attempts=3
209+
for attempt in $(seq 1 "${attempts}"); do
210+
python -m localstack_cli.cli.main start -d
211+
if python -m localstack_cli.cli.main wait -t 400; then
212+
echo "Emulator ready (attempt ${attempt}/${attempts})."
213+
exit 0
214+
fi
215+
echo "::warning::Emulator was not ready within 400s (attempt ${attempt}/${attempts})."
216+
docker logs localstack-main --tail 100 2>&1 || true
217+
python -m localstack_cli.cli.main stop || true
218+
done
219+
echo "::error::Emulator failed to become ready after ${attempts} attempts."
220+
exit 1
198221
env:
199222
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}
200223
LOCALSTACK_AUTH_TOKEN: ${{ secrets.TEST_LOCALSTACK_AUTH_TOKEN }}
@@ -260,6 +283,12 @@ jobs:
260283
- name: "Run: ${{ matrix.name }}"
261284
# Each job runs exactly one test. SPLITS equals the total test count, and SHARD
262285
# is the 1-based index of this specific test, so run-samples.sh executes only it.
286+
id: initial_run
287+
# Samples provision real containers through the emulator, so a single transient error (a 500
288+
# from a provisioning call, a slow container start) fails the whole sample - which is what
289+
# has been needing manual job re-runs. The retry step below decides this job's outcome, so a
290+
# genuinely broken sample still fails: it fails both attempts.
291+
continue-on-error: true
263292
run: make test SHARD="${SHARD}" SPLITS="${SPLITS}"
264293
env:
265294
# Dynamic matrix values routed via env, not interpolated into the shell (template-injection)
@@ -268,6 +297,31 @@ jobs:
268297
LOCALSTACK_AUTH_TOKEN: ${{ secrets.TEST_LOCALSTACK_AUTH_TOKEN }}
269298
PURGE_DOCKER: "1"
270299

300+
- name: "Retry: ${{ matrix.name }}"
301+
# The deploy scripts are not idempotent - they fail on resources that already exist - so the
302+
# retry runs against a fresh emulator instead of the half-provisioned state the failed
303+
# attempt left behind.
304+
if: steps.initial_run.outcome == 'failure'
305+
run: |
306+
source .venv/bin/activate
307+
echo "::warning::${MATRIX_NAME} failed once; retrying on a fresh emulator."
308+
python -m localstack_cli.cli.main stop || true
309+
python -m localstack_cli.cli.main start -d
310+
python -m localstack_cli.cli.main wait -t 600
311+
make test SHARD="${SHARD}" SPLITS="${SPLITS}"
312+
env:
313+
MATRIX_NAME: ${{ matrix.name }}
314+
SHARD: ${{ matrix.shard }}
315+
SPLITS: ${{ matrix.splits }}
316+
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}
317+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.TEST_LOCALSTACK_AUTH_TOKEN }}
318+
DOCKER_FLAGS: "-e MSSQL_ACCEPT_EULA=Y -e GITHUB_API_TOKEN=${{ github.token }}"
319+
LS_LOG: "DEBUG"
320+
DISABLE_EVENTS: "1"
321+
ACTIVATE_PRO: "1"
322+
DNS_ADDRESS: "0"
323+
PURGE_DOCKER: "1"
324+
271325
- name: Get LocalStack Logs
272326
# Captured on failure or success to provide a detailed audit trail of the emulator's activity.
273327
if: always()

‎README.md‎

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,28 @@ This repository contains comprehensive sample projects demonstrating how to deve
2727

2828
## Outline
2929

30-
| Sample Name | Description |
31-
|-------------|-------------|
32-
| [Function App and Storage](./samples/function-app-storage-http/dotnet/README.md) | Azure Functions App using Blob, Queue, and Table Storage |
33-
| [Function App and Front Door](./samples/function-app-front-door/python/README.md) | Azure Functions App exposed via Front Door |
34-
| [Function App and Managed Identities](./samples/function-app-managed-identity/python/README.md) | Azure Function App using Managed Identities |
35-
| [Function App and Service Bus](./samples/function-app-service-bus/dotnet/README.md) | Azure Function App using Service Bus |
36-
| [Web App and CosmosDB for MongoDB API ](./samples/web-app-cosmosdb-mongodb-api/python/README.md) | Azure Web App using CosmosDB for MongoDB API |
37-
| [Web App and CosmosDB for NoSQL API ](./samples/web-app-cosmosdb-nosql-api/python/README.md) | Azure Web App using CosmosDB for NoSQL API |
38-
| [Web App and Managed Identities](./samples/web-app-managed-identity/python/README.md) | Azure Web App using Managed Identities |
39-
| [Web App and SQL Database ](./samples/web-app-sql-database/python/README.md) | Azure Web App using SQL Database |
40-
| [Web App and PostgreSQL Database ](./samples/web-app-postgresql-flexible-server/python/README.md) | Azure Web App using PostgreSQL Database |
41-
| [Web App and MySQL Database ](./samples/web-app-mysql-flexible-server/python/README.md) | Azure Web App using MySQL Database |
42-
| [Web App with Custom Docker Image](./samples/web-app-custom-image/python/README.md) | Azure Web App running a custom Docker image |
43-
| [ACI and Blob Storage](./samples/aci-blob-storage/python/README.md) | Azure Container Instances with ACR, Key Vault, and Blob Storage |
44-
| [Container Apps and Blob Storage](./samples/container-apps-blob-storage/python/README.md) | Azure Container Apps running a guestbook app from ACR with Blob Storage, secrets, revisions, replicas and scale rules |
45-
| [Azure Service Bus with Spring Boot](./samples/servicebus/java/README.md) | Azure Service Bus used by a Spring Boot application |
46-
| [URL Shortener](./samples/url-shortener/python/README.md) | URL shortener composing Web App, Functions, Storage, Key Vault, Service Bus and PostgreSQL |
47-
| [Event Hubs Fraud Detection Pipeline](./samples/eventhubs/python/README.md) | Real-time payment stream processing with Event Hubs (AMQP, Kafka and HTTPS ingestion, Capture, Schema Registry), an Event Hubs-triggered Function App, Key Vault, Storage and a Web App dashboard |
48-
| [Event Hubs Cold-Path Automation](./samples/eventhubs-eventgrid/python/README.md) | Event Hubs Capture raises `Microsoft.EventHub.CaptureFileCreated` to an Event Grid system topic, a subscription delivers it into a second event hub, and an Event Hubs-triggered Function App decodes each Avro archive and writes per-device summaries |
49-
30+
Each sample is a self-contained project with its own README, Azure CLI scripts and, where applicable, Bicep and Terraform deployments that target both real Azure and the LocalStack for Azure emulator. The language of each implementation is shown in parentheses; the web-app samples share the same *Vacation Planner* application and come in a Python (Flask) and a .NET 10 (ASP.NET Core Razor Pages) version.
31+
32+
| Sample | Description |
33+
|--------|-------------|
34+
| [Function App and Storage (.NET)](./samples/function-app-storage-http/dotnet/README.md) | A gaming scoreboard built on Azure Functions (isolated worker): HTTP triggers record player scores in Table Storage, publish messages to Queue Storage and write game-session summaries to Blob Storage, all against the emulated storage account. |
35+
| [Function App and Front Door (Python)](./samples/function-app-front-door/python/README.md) | A minimal Python Function App answering `/{name}`, published behind an Azure Front Door (Standard) profile so requests reach the function through the Front Door endpoint; deployable to real Azure or to the emulator. |
36+
| [Function App and Managed Identities (Python)](./samples/function-app-managed-identity/python/README.md) | A serverless text processor: an Azure Functions app reads text blobs from an `input` container, converts them to uppercase and writes the result to an `output` container, authenticating to the storage account with a managed identity instead of keys. |
37+
| [Function App and 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. |
38+
| Web App and CosmosDB 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. |
39+
| Web App and 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; deployed with Azure CLI scripts. |
40+
| Web App and 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. |
41+
| Web App and 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. |
42+
| Web App and 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. |
43+
| Web App and MySQL Database ([Python](./samples/web-app-mysql-flexible-server/python/README.md), [.NET](./samples/web-app-mysql-flexible-server/dotnet/README.md)) | The *Vacation Planner* single-page web app on an Azure Web App, storing activities in an Azure Database for MySQL flexible server injected into a virtual network, using TLS-only connections, with the database and application user created by the deploy scripts. |
44+
| Web App with Custom Docker Image ([Python](./samples/web-app-custom-image/python/README.md), [.NET](./samples/web-app-custom-image/dotnet/README.md)) | A web app that runs a custom container image built locally and pushed to Azure Container Registry; the web app pulls it with a managed identity (AcrPull) through a VNet-integrated network and reports its image and host name on `/api/status`. |
45+
| [ACI and Blob Storage (Python)](./samples/aci-blob-storage/python/README.md) | A containerized Flask web app on Azure Container Instances, with its image in Azure Container Registry, its secrets in Key Vault and its data in Blob Storage. |
46+
| [Container Apps and Blob Storage (Python)](./samples/container-apps-blob-storage/python/README.md) | A guestbook web app on Azure Container Apps pulled from Azure Container Registry that persists entries in Blob Storage and exercises secrets, revisions, replicas and scale rules. |
47+
| [Azure Service Bus with Spring Boot (Java)](./samples/servicebus/java/README.md) | A Java Spring Boot application that sends and receives Service Bus messages through the Spring Cloud Azure Service Bus Stream Binder. |
48+
| [URL Shortener (Python)](./samples/url-shortener/python/README.md) | *Linklet*, a Flask URL shortener on an Azure Web App with an event-driven Azure Functions worker, composing Web App, Functions, Storage, Key Vault, Service Bus and PostgreSQL into a single causal chain. |
49+
| [Event Hubs Fraud Detection Pipeline (Python)](./samples/eventhubs/python/README.md) | A streaming platform in miniature: payments ingested into Event Hubs over AMQP, Kafka and HTTPS, validated against Schema Registry, archived with Capture, scored by an Event Hubs-triggered Function App and shown on a Web App dashboard, with secrets in Key Vault. |
50+
| [Event Hubs Cold-Path Automation (Python)](./samples/eventhubs-eventgrid/python/README.md) | A cold-chain monitoring pipeline in which Event Hubs Capture raises `Microsoft.EventHub.CaptureFileCreated` events to an Event Grid system topic; a subscription delivers them into a second event hub and an Event Hubs-triggered Function App decodes each Avro archive into per-device summaries. |
51+
5052
## Sample Structure
5153

5254
Each sample project is organized by Azure service and includes:

‎run-samples.sh‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,18 @@ SAMPLES=(
3737
"samples/function-app-service-bus/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-http-trigger.sh"
3838
"samples/function-app-storage-http/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-http-triggers.sh"
3939
"samples/web-app-cosmosdb-mongodb-api/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
40+
"samples/web-app-cosmosdb-mongodb-api/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
41+
"samples/web-app-cosmosdb-nosql-api/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
4042
"samples/web-app-managed-identity/python|bash scripts/user-assigned.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
41-
"samples/web-app-sql-database/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/get-web-app-url.sh"
43+
"samples/web-app-managed-identity/dotnet|bash scripts/user-assigned.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
44+
"samples/web-app-sql-database/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
45+
"samples/web-app-sql-database/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
4246
"samples/web-app-mysql-flexible-server/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
47+
"samples/web-app-mysql-flexible-server/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
4348
"samples/web-app-postgresql-flexible-server/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
49+
"samples/web-app-postgresql-flexible-server/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
4450
"samples/web-app-custom-image/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
51+
"samples/web-app-custom-image/dotnet|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
4552
"samples/aci-blob-storage/python|bash scripts/deploy.sh|bash scripts/validate.sh"
4653
"samples/container-apps-blob-storage/python|bash scripts/deploy.sh|bash scripts/validate.sh"
4754
"samples/url-shortener/python|bash scripts/deploy.sh|bash scripts/validate.sh && bash scripts/call-web-app.sh"
@@ -56,10 +63,15 @@ TERRAFORM_SAMPLES=(
5663
"samples/function-app-service-bus/dotnet/terraform|bash deploy.sh"
5764
"samples/function-app-storage-http/dotnet/terraform|bash deploy.sh"
5865
"samples/web-app-cosmosdb-mongodb-api/python/terraform|bash deploy.sh"
66+
"samples/web-app-cosmosdb-mongodb-api/dotnet/terraform|bash deploy.sh"
5967
"samples/web-app-managed-identity/python/terraform|bash deploy.sh"
68+
"samples/web-app-managed-identity/dotnet/terraform|bash deploy.sh"
6069
"samples/web-app-sql-database/python/terraform|bash deploy.sh"
70+
"samples/web-app-sql-database/dotnet/terraform|bash deploy.sh"
6171
"samples/web-app-mysql-flexible-server/python/terraform|bash deploy.sh"
72+
"samples/web-app-mysql-flexible-server/dotnet/terraform|bash deploy.sh"
6273
"samples/web-app-postgresql-flexible-server/python/terraform|bash deploy.sh"
74+
"samples/web-app-postgresql-flexible-server/dotnet/terraform|bash deploy.sh"
6375
"samples/aci-blob-storage/python/terraform|bash deploy.sh"
6476
"samples/container-apps-blob-storage/python/terraform|bash deploy.sh"
6577
"samples/url-shortener/python/terraform|bash deploy.sh|bash ../scripts/validate.sh"
@@ -75,9 +87,13 @@ BICEP_SAMPLES=(
7587
"samples/function-app-service-bus/dotnet/bicep|bash deploy.sh"
7688
"samples/function-app-storage-http/dotnet/bicep|bash deploy.sh"
7789
"samples/web-app-cosmosdb-mongodb-api/python/bicep|bash deploy.sh"
90+
"samples/web-app-cosmosdb-mongodb-api/dotnet/bicep|bash deploy.sh"
7891
"samples/web-app-managed-identity/python/bicep|bash deploy.sh"
92+
"samples/web-app-managed-identity/dotnet/bicep|bash deploy.sh"
7993
"samples/web-app-mysql-flexible-server/python/bicep|bash deploy.sh"
94+
"samples/web-app-mysql-flexible-server/dotnet/bicep|bash deploy.sh"
8095
"samples/web-app-postgresql-flexible-server/python/bicep|bash deploy.sh"
96+
"samples/web-app-postgresql-flexible-server/dotnet/bicep|bash deploy.sh"
8197
"samples/aci-blob-storage/python/bicep|bash deploy.sh"
8298
"samples/container-apps-blob-storage/python/bicep|bash deploy.sh"
8399
"samples/url-shortener/python/bicep|bash deploy.sh|bash ../scripts/validate.sh"
@@ -122,6 +138,7 @@ ARM64_SAMPLE_DIRS=(
122138
"samples/function-app-service-bus/dotnet"
123139
"samples/function-app-storage-http/dotnet"
124140
"samples/web-app-custom-image/python"
141+
"samples/web-app-custom-image/dotnet"
125142
)
126143

127144
# Fail loudly if an entry no longer matches a registered sample: a rename would otherwise

‎samples/aci-blob-storage/python/terraform/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ provider "azurerm" {
3838
prevent_deletion_if_contains_resources = false
3939
}
4040
}
41-
metadata_host="localhost.localstack.cloud:4566"
41+
metadata_host="azure.localhost.localstack.cloud:4566"
4242
subscription_id = "00000000-0000-0000-0000-000000000000"
4343
}
4444
```

‎samples/aci-blob-storage/python/terraform/providers.tf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ provider "azurerm" {
1919
# Set the hostname of the Azure Metadata Service (for example management.azure.com)
2020
# used to obtain the Cloud Environment when using LocalStack's Azure emulator.
2121
# This allows the provider to correctly identify the environment and avoid making calls to the real Azure endpoints.
22-
metadata_host = "localhost.localstack.cloud:4566"
22+
metadata_host = "azure.localhost.localstack.cloud:4566"
2323

2424
# Set the subscription ID to a dummy value when using LocalStack's Azure emulator.
2525
subscription_id = "00000000-0000-0000-0000-000000000000"

‎samples/container-apps-blob-storage/python/terraform/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ provider "azurerm" {
3636
prevent_deletion_if_contains_resources = false
3737
}
3838
}
39-
metadata_host="localhost.localstack.cloud:4566"
39+
metadata_host="azure.localhost.localstack.cloud:4566"
4040
subscription_id = "00000000-0000-0000-0000-000000000000"
4141
}
4242
```

0 commit comments

Comments
 (0)