Skip to content

fix(azure-cosmos-db): auto-install tofu when not available in agent PATH#15

Merged
gdrojas merged 1 commit into
mainfrom
fix/azure-do-tofu-auto-install
May 15, 2026
Merged

fix(azure-cosmos-db): auto-install tofu when not available in agent PATH#15
gdrojas merged 1 commit into
mainfrom
fix/azure-do-tofu-auto-install

Conversation

@gdrojas

@gdrojas gdrojas commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Ports the same auto-install pattern from the AWS do_tofu scripts to the Azure Cosmos DB service
  • If tofu is not found in PATH, downloads and caches the binary in /tmp/np-tofu-bin for the pod lifetime
  • Fixes deployments failing on Azure agents that do not have tofu pre-installed

Root cause

The AWS do_tofu already had this guard (if ! command -v tofu). The Azure version assumed tofu was pre-installed in the agent, which is not always the case.

Test plan

  • Deploy azure-cosmos-db service on an Azure agent without tofu pre-installed
  • Verify tofu is downloaded and the deploy completes successfully
  • Re-run deploy on same pod — verify cached binary is reused (no re-download)

Port the same pattern used in the AWS do_tofu scripts: if tofu is not
found in PATH, download and cache the binary in /tmp/np-tofu-bin for
the pod lifetime. Fixes deployments failing on Azure agents that do
not have tofu pre-installed.
@gdrojas gdrojas merged commit c50a32a into main May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants