Repository navigation
Terraform finds the emulator on its Azure host, and the Windows CI builds with BuildKit - #57
Merged
paolosalvatori merged 2 commits intoNov 19, 2026
Conversation
Since localstack-pro #10527 the emulator serves Azure, its metadata endpoint included, only on azure.localhost.localstack.cloud and the real Azure hosts, so the azurerm provider got a 404 from the localhost.localstack.cloud:4566 metadata host that terraform/deploy.sh and the tags-labels-taints tutorial hardcoded, and the Terraform cluster jobs failed at terraform plan. Both scripts now take the host and port of the Resource Manager endpoint the Azure CLI targets, azure.localhost.localstack.cloud:4566 with lstk, so Terraform always reaches the emulator where the Azure CLI does. Fixes SMF-1179 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FvNuJMQFHqFMvJqLV82s3h
The docker CLI of the Windows runner image has no buildx plugin, so the samples' docker build fell back to the legacy builder on the Docker Engine 29 in WSL, whose containerd image store skipped downloading the Debian layer of python:3.13-slim that the emulator image holds under another digest. docker push then failed with "content digest ...: not found" in every Windows Python job. The job now installs the buildx plugin, pinned with its SHA-256, so it builds with BuildKit like Docker Desktop and the Linux runner, and the README tells Windows users to do the same. Fixes SMF-1180 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FvNuJMQFHqFMvJqLV82s3h
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Terraform emulator metadata and Windows CI BuildKit changes.
No open issues 🎉
What changed in this PR
This PR addresses Terraform metadata discovery failures against the Azure emulator and Windows CI image-push failures caused by the legacy Docker builder.
Changes:
- Derive Terraform’s emulator metadata host from the Azure CLI Resource Manager endpoint, leaving real Azure behavior unchanged.
- Install a version- and checksum-pinned buildx plugin in Windows CI to enable BuildKit.
- Update Terraform configuration descriptions and Windows troubleshooting guidance.
| File | Description |
|---|---|
tutorials/terraform/tags-labels-taints/variables.tf |
Update the metadata-host description to name the Azure emulator host. |
tutorials/terraform/tags-labels-taints/providers.tf |
Correct the emulator host in provider comments. |
tutorials/terraform/tags-labels-taints/deploy.sh |
Derive the metadata host from the active Resource Manager endpoint. |
terraform/README.md |
Document how the emulator metadata host is selected. |
terraform/providers.tf |
Correct the emulator host in provider comments. |
terraform/deploy.sh |
Derive the metadata host from the active Resource Manager endpoint. |
README.md |
Explain BuildKit setup and recovery from missing-layer push failures on Windows. |
.github/workflows/run-samples.yml |
Install and verify the pinned Windows buildx plugin. |
Review effort: Balanced
Collaborator
Author
|
Windows results, from run 44513075583 on this branch (started manually, platform
With this pull request's Linux run (23 of 23 jobs), every job that failed on 2026-11-19 now passes. |
paolosalvatori
deleted the
fix-terraform-metadata-host-and-windows-buildx
branch
November 20, 2026 18:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The manual run of this repository's Samples CI on 2026-11-19 (every sample on Linux and Windows, run 44497987605) failed 13 of its 45 jobs against
localstack/localstack-azure:latest, for two unrelated reasons.azure.localhost.localstack.cloudand on the real Azure hosts.terraform/deploy.shhardcodedlocalhost.localstack.cloud:4566as the metadata host of azurerm, soterraform planfailed withretrieving metadata from endpoint "https://localhost.localstack.cloud:4566": performing request: expected 200 OK but got 404. The scripts and the Bicep deployment were not affected, because the Azure CLI already targetshttps://azure.localhost.localstack.cloud:4566/.04-push-docker-image.shfailed withNotFound: content digest sha256:37fb86c2a767...: not found. Since 2026-11-16 the emulator image is built on the samepython:3.13-slimas the Python samples, but it holds the Debian layer of that image under another digest. The Windows job built with the legacy builder, because the docker CLI of the Windows runner has no buildx plugin. With the containerd image store of the Docker Engine 29 the job runs in WSL, that builder does not download a base layer whose content another image already unpacked, sodocker pushcannot find it. BuildKit downloads every layer of the image it stores.Fixes SMF-1179 and SMF-1180
Changes
terraform/deploy.shandtutorials/terraform/tags-labels-taints/deploy.sh: on the emulator, the metadata host of azurerm is the host and port of the Resource Manager endpoint the Azure CLI targets (az cloud show --query endpoints.resourceManager),azure.localhost.localstack.cloud:4566with lstk, instead of a hardcodedlocalhost.localstack.cloud:4566. Nothing changes on Azure, where the scripts pass no metadata host.terraform/README.md, bothproviders.tffiles and the tutorial'svariables.tf: the comments and descriptions name the new host..github/workflows/run-samples.yml: the Windows job installs the buildx plugin, v0.38.2 pinned with its SHA-256 like yq and sqlcmd, sodocker builduses BuildKit, as on Docker Desktop and on the Linux runner.README.md, Windows section: build the images with BuildKit, and whatcontent digest ...: not foundmeans.Tests
docker:29.1.3-dind(Docker 29.1.3 with the containerd image store, as in the Windows job), buildingFROM python:3.13-slimplus oneRUNand pushing to a localregistry:3:docker pull localstack/localstack-azure:latest, with the legacy builder: the base image pull downloads no layer, and the push fails with the CI'sNotFound: content digest sha256:37fb86c2a767...: not found.37fb86c2a767, and the push succeeds.localstack/localstack-azure:latestsha256:1c0fd9ad...(the image of the failed run), with the steps of the Linux job:terraform/deploy.sh,tests/test-diagnostic-settings.sh, theweb-app-managed-identityPython scripts01,02,04and05, andtests/test-vacation-planner.shall passed. On the same emulator,terraform planof the tags-labels-taints tutorial planned its 16 resources with the derived host, and failed with the CI's 404 with the old one.Windows, covers the 22 Windows jobs: in progress, the result follows in a comment.bash -n,pre-commit run(zizmor, gitleaks) and actionlint 1.7.7 (with shellcheck on the run blocks) pass. shellcheck reports the same six notes interraform/deploy.shas onmain.Related
api-management-function-appsample.🤖 Generated with Claude Code
https://claude.ai/code/session_01FvNuJMQFHqFMvJqLV82s3h