feat: Script Provisioning Provider extension (microsoft.azd.scripts)#7737
Draft
wbreza wants to merge 2 commits intoAzure:feature/ext-provisioning-providerfrom
Draft
feat: Script Provisioning Provider extension (microsoft.azd.scripts)#7737wbreza wants to merge 2 commits intoAzure:feature/ext-provisioning-providerfrom
wbreza wants to merge 2 commits intoAzure:feature/ext-provisioning-providerfrom
Conversation
Implements the Script Provisioning Provider extension that enables shell script-based provisioning and teardown workflows in azd. This extension registers a 'scripts' provisioning provider via gRPC, allowing users to configure bash/PowerShell scripts as their infrastructure provider in azure.yaml. Key components: - Extension scaffold following microsoft.azd.demo pattern - Config parsing with validation (path safety, kind inference, platform overrides) - EnvResolver with 4-layer environment variable merging - ScriptExecutor for bash/pwsh script execution - OutputCollector for outputs.json discovery and parsing - Full ProvisioningProvider interface implementation Resolves Azure#7734, Azure#7735, Azure#7736 Part of Azure#7733 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix ContinueOnError bug: platform override no longer unconditionally resets the field when the override doesn't set it - Fix getAzdEnv: propagate context cancellation, warn on other errors instead of silently swallowing all failures - Add 10MB size limit on outputs.json to prevent OOM - Remove dead ScriptResult fields (Stdout/Stderr never populated) - Remove unused exported functions (OutputsToEnvMap, OutputsToProvisioning) - Extract toProtoOutputs helper to reduce duplication - Improve shBinary() portability: use LookPath with /bin/sh fallback - Add platform override tests (ContinueOnError preservation, env merge) - Add executor unit tests (buildShellCommand, mapToEnvSlice) - Fix hardcoded /tmp path in test to use t.TempDir() - Update README: clarify secrets are plain values in alpha Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0665896 to
30e76ca
Compare
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.
Description
Implements the Script Provisioning Provider extension (
microsoft.azd.scripts) that enables shell script-based provisioning and teardown workflows in azd. This is a first-party extension that registers ascriptsprovisioning provider via gRPC.Epic: #7733
Depends on: #7482 (provisioning provider framework)
Resolves: #7734, #7735, #7736
Architecture
The extension is a pure provisioning provider — no custom CLI commands, no MCP server. It registers via
WithProvisioningProvider("scripts", factory)and implements the fullazdext.ProvisioningProviderinterface.Key Components
internal/provisioning/config.goinfra.configwith validationinternal/provisioning/env_resolver.gointernal/provisioning/executor.gointernal/provisioning/output_collector.gooutputs.jsonfilesinternal/provisioning/provider.goProvisioningProviderimplementationUser Configuration
Testing
Checklist
go buildscriptsprovider via gRPC.sh->sh,.ps1->pwsh)${EXPRESSION}substitution