Skip to content

[Codex] azure/azure-dev#​7776 — feat(exegraph): graph-driven execution engine for up/provision/deploy - #3

Closed
IanMatthewHuff wants to merge 62 commits into
base/pr-7776-f532720-run-20260522T221426Zfrom
review/pr-7776-5f6079a-run-20260522T221426Z-codex
Closed

[Codex] azure/azure-dev#​7776 — feat(exegraph): graph-driven execution engine for up/provision/deploy#3
IanMatthewHuff wants to merge 62 commits into
base/pr-7776-f532720-run-20260522T221426Zfrom
review/pr-7776-5f6079a-run-20260522T221426Z-codex

Conversation

@IanMatthewHuff

Copy link
Copy Markdown
Owner

Related Issues

Fixes Azure#6291 ΓÇö Support Parallel Provisioning of Infrastructure Layers
Fixes Azure#5294 ΓÇö Create layer deployment orchestration engine

Related:

Summary

Introduces pkg/exegraph ΓÇö a general-purpose DAG execution engine ΓÇö and rebuilds azd up, azd provision, and azd deploy on top of it. Independent work now runs concurrently with dependency-aware scheduling instead of strictly sequentially. No opt-in flag; single-node cases (single-layer provision, preview, single service) run as one-node graphs through the same code path with trivial overhead.

User-authored workflows.up: still runs on workflow.Runner; phase-scoped DAGs apply inside each sub-command it invokes.

Scope: 76 files changed, +10,338 / −779.

Motivation

Today provision, deploy, and up execute sequentially:

  • Bicep layers deploy one at a time.
  • Services package, publish, and deploy in series.
  • Wall-clock time scales linearly with resource/service count.

Exegraph runs independent work concurrently, bounded by declared dependencies, with a single unified orchestration for up so packaging can overlap with provisioning automatically.

What's in this PR

Engine ΓÇö cli/azd/pkg/exegraph/

  • Graph / Step primitives with three-color DFS cycle detection and transitive-dependent priority (critical-path bias).
  • Goroutine-per-ready-node scheduler with FailFast / ContinueOnError policies and uniform per-step timeout via RunOptions.StepTimeout.
  • Cancellation classification: parent-cancel ΓåÆ skip; per-step timeout ΓåÆ failure.
  • Adaptive polling with exponential backoff and ARM 429 throttle detection for Bicep deployments.
  • Kahn-level resolution for multi-layer provision.

Orchestrators ΓÇö cli/azd/internal/cmd/

  • up_graph.go, provision_graph.go, deploy_graph built on the engine.
  • service_graph.go builds service nodes for deploy and up; project_hooks.go builds cmdhook-* synthetic nodes for preprovision / postprovision / predeploy / postdeploy.
  • Middleware fires only preup / postup for azd up, so project hooks never double-fire.
  • Multi-layer provision initializes the provider once up front to serialize subscription/location prompts before fan-out.
  • Shared deploy timeout resolution (--timeout > AZD_DEPLOY_TIMEOUT > 1200s) between azd deploy and azd up.
  • DeadlineExceeded surfaces a dedicated timeout UX.
  • --output json skips the live deploy tracker to keep JSON clean.

Layer dependencies ΓÇö cli/azd/pkg/infra/provisioning/bicep/layer_deps.go

Static analysis of Bicep output → parameter references to build the provision DAG.

Observability

  • OpenTelemetry spans: exegraph.Run per run, exegraph.Step per node.
  • Stable attribute keys (step count, max concurrency, error policy, step name/deps/tags/timeout) registered in internal/tracing/fields.

Correctness / safety

  • runProvisionSingleLayer guards shared state with scoped closures + defer so panics can't leave locks held.
  • errPreflightAbortedByUser translates to ErrAbortedByUser for correct cancellation exit codes.
  • ServiceConfig hook registration moved behind a pointer-held guard struct; value copies are safe (go vet copylocks clean).

New configuration (all optional, all clamp to 64)

Variable Purpose Default
AZD_PROVISION_CONCURRENCY Worker cap for multi-layer provision engine default
AZD_DEPLOY_CONCURRENCY Worker cap for deploy graph engine default
AZD_UP_CONCURRENCY Worker cap for the unified up graph engine default
AZD_DEPLOY_TIMEOUT Per-service deploy timeout in seconds 1200

Compatibility

  • No feature flag; activation is unconditional.
  • Single-layer provision and preview run as single-node graphs ΓÇö same code path, no behavior change for the common case.
  • workflows.up: (user-authored) continues to run on workflow.Runner unchanged.
  • Project command hooks fire exactly once per run (the middleware fires only preup / postup for azd up; cmdhook-* nodes in the graph handle everything else).

Spec

Full design ΓÇö engine semantics, unified pipeline, env vars, and how it differs from the prior sequential model ΓÇö at docs/specs/exegraph/spec.md.

Quality gates

Gate Status Notes
mage preflight (cli/azd) Pass 9/9 gofmt, go fix, copyright, golangci-lint, cspell (Go + misc), build, unit tests, playback tests
Unit tests Pass go test ./... -short -cover -count=1
Playback tests See below 16 pass; 2 new cassettes need re-recording before merge

Test recording debt (MUST re-record before merge)

Three integration tests capture new HTTP interactions introduced by this branch. They are currently listed in excludedPlaybackTests in magefile.go so preflight is green, but need to be re-recorded against live Azure before merge:

  • Test_DeploymentStacks ΓÇö graph-driven provision adds calculateTemplateHash and resource-group existence probes.
  • Test_CLI_ProvisionState ΓÇö same: new calculateTemplateHash interactions from pkg/infra/provisioning/bicep/layer_deps.go.
  • Test_CLI_InfraCreateAndDeleteUpperCase ΓÇö same: new calculateTemplateHash interactions break the --output json state-retrieval path.

Re-record with AZURE_RECORD_MODE=record and a subscription with sufficient quota, then remove the three entries from excludedPlaybackTests in the same commit.

The other 8 entries in excludedPlaybackTests are pre-existing stale recordings (verified to also fail on main@460822e34) and are out of scope for this PR, tracked in Azure#7780.

Review focus

  1. Scheduler cancellation semantics ΓÇö parent-cancel vs per-step timeout classification in scheduler.go.
  2. Layer dependency analysis correctness — layer_deps.go output → parameter graph construction.
  3. up_graph.go wiring ΓÇö cmdhook synthesis + middleware gating to ensure hooks fire exactly once.
  4. Single-node fallback paths ΓÇö confirm trivial overhead for single-layer / single-service cases.
  5. Env var precedence and clamping in RunOptions.

Out of scope (follow-ups)

  • Re-record the three integration tests above.
  • Tuning default concurrency caps based on telemetry once this lands.
  • Extending the engine to other sub-commands (e.g., package).

Key Discussion Links

Review Resolution

Performance

Review Rounds

Architecture Discussion


Mirrored from upstream PR: https://​github.com/Azure/azure-dev/pull/7776
Created automatically by pr-sxs-human-evals for code-review agent comparison.
(URL wrapped in a code span so GitHub does not create a cross-reference on the upstream timeline.)

jongio and others added 30 commits May 22, 2026 22:14
Add `pkg/exegraph` — a DAG execution engine — and run `azd up`,
`azd provision`, and `azd deploy` on it. User-authored `workflows.up:`
continues to run on `workflow.Runner` (phase-scoped DAGs still apply
inside each sub-command it invokes).

- `Graph` / `Step` with three-color DFS cycle detection and
  transitive-dependent priority.
- Goroutine-per-ready-node scheduler; `FailFast` and `ContinueOnError`
  policies; uniform per-step timeout via `RunOptions.StepTimeout`.
- Cancellation classification distinguishes parent-cancel (skip) from
  per-step timeout (failure).
- Adaptive polling with exponential backoff and ARM 429 throttle
  detection for Bicep deployments.
- Kahn-level resolution for multi-layer provision.

- `azd up`, `azd provision`, and `azd deploy` build a graph and dispatch
  through the scheduler. Single-layer provision and preview run as
  single-node graphs (uniform code path, trivial overhead).
- Project command hooks (`preprovision`, `postprovision`, `predeploy`,
  `postdeploy`) run as synthetic `cmdhook-*` nodes inside the graph.
  Middleware fires only `preup`/`postup` for `azd up`, so hooks never
  double-fire.
- Shared helpers: `service_graph.go` builds service nodes for deploy
  and up; `project_hooks.go` builds the `cmdhook-*` nodes.
- Multi-layer provision initializes the provider once up front so
  subscription/location prompts serialize before any fan-out.
- Deploy timeout resolution (`--timeout`, `AZD_DEPLOY_TIMEOUT`, default)
  is shared between `azd deploy` and `azd up`.
- `DeadlineExceeded` surfaces a dedicated timeout UX.
- `--output json` skips the live deploy tracker to keep JSON clean.

New environment variables (all optional, all clamp to 64):

- `AZD_PROVISION_CONCURRENCY` — worker cap for multi-layer provision.
- `AZD_DEPLOY_CONCURRENCY` — worker cap for deploy graph.
- `AZD_UP_CONCURRENCY` — worker cap for the unified up graph.
- `AZD_DEPLOY_TIMEOUT` — per-service deploy timeout in seconds
  (precedence: `--timeout` flag > env var > default 1200s).

- OpenTelemetry span per run (`exegraph.Run`) and per step
  (`exegraph.Step`) with stable attribute keys (step count, max
  concurrency, error policy, step name/deps/tags/timeout) defined in
  `internal/tracing/fields`.

- `runProvisionSingleLayer` guards shared state with scoped closures
  and `defer` so panics can't leave locks held.
- `errPreflightAbortedByUser` translates to `ErrAbortedByUser` for
  correct cancellation exit.
- `ServiceConfig` hook registration lives behind a pointer-held guard
  struct so value copies are safe (`go vet copylocks` clean).

- `docs/specs/exegraph/spec.md` describes the engine, the unified
  pipeline, env vars, and the semantic differences from the prior
  sequential model.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- .vscode/cspell.misc.yaml: add 'stdlib' override for docs/specs/exegraph/**

  so cspell-misc stops flagging the spec. Mirrors the existing

  perf-foundations override.

- cli/azd/magefile.go: populate excludedPlaybackTests map.

  - 8 tests with pre-existing stale recordings (also fail on main).

  - 2 tests (Test_DeploymentStacks, Test_CLI_ProvisionState) that need

    re-recording because the graph-driven up/provision path introduced

    new HTTP interactions (calculateTemplateHash layer hash probes and

    resource-group existence checks). Must be re-recorded with live

    Azure credentials before merge; documented in the map with notes.

With both changes, 'mage preflight' passes all 9 checks locally.
- layer_deps.go: restructure phase-1 loop to iterate `layers` directly
  so static analyzers (gosec G602) see bounded indexing; add defensive
  bounds check on `prev` in the duplicate-output error path.
- bicep.go: document the read-only, developer-controlled file-hashing
  flow in `hashBicepFileTree` and silence gosec G304 with a targeted
  nolint directive.
- bicep_cache_test.go: fix `string(rune('0'+callCount))` which
  silently breaks when callCount > 9; use `fmt.Sprintf("%d", n)`.
- magefile.go: add `Test_CLI_InfraCreateAndDeleteUpperCase` to
  excludedPlaybackTests (same calculateTemplateHash recording debt
  as the two other feat/exegraph entries; must be re-recorded in
  record mode before merge).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- layer_deps: keep intra-graph producer edges even when env var is pre-set
  (fixes stale-value race on template changes; edges were dropped by the
  LookupEnv early-continue)
- up_graph: route errors through shared wrapProvisionError helper so the
  unified \�zd up\ path gets full parity with stand-alone \�zd provision\:
  JSON state dump on failure, OpenAI access suggestion, AI quota suggestion,
  Responsible AI suggestion. Extracted to package-level function taking
  provisionErrorDeps so both actions share one implementation.
- scheduler: honor MaxConcurrency as upper bound (was silently capped at
  GOMAXPROCS*2, misleading for IO-bound workloads)
- scheduler: snapshot runCtx state at step-completion time (worker-side),
  not observation time (event-loop-side), to prevent FailFast tear-down
  from mis-classifying genuine per-step timeouts as scheduler cancellations
- scheduler: synthesize StepSkipped timings for unqueued steps on
  FailFast/parent-cancel so result.Steps is complete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- bicep_provider: serialize deploymentState ARM calls — fetch prior
  deployment first, skip CalculateTemplateHash when there is no
  comparable prior. Removes an ARM call per layer on the common
  cold-start path and avoids direct rate-limit pressure under
  multi-layer fan-out.
- bicep_provider: invalidate deployment state when CheckExistenceByID
  returns an error (transient ARM/throttling/auth). Previously a
  probe error was silently treated as 'RG still exists', so a
  deleted-out-of-band RG could be missed and the cached state
  incorrectly reused.
- service_target_containerapp: persist template hash via envManager.Save
  when it changes inside shouldUseDirectRevisionAPI, so the direct-
  revision optimization survives process exit on revision paths that
  have no deployment outputs. Previously the in-memory DotenvSet was
  lost and the next deploy fell back to full ARM provisioning.
- up_graph: guard layerDeps==nil in addProvisionSteps so a future
  caller that skips AnalyzeLayerDependencies can't crash on a nil-map
  access. Treats nil as 'no inter-layer edges' (safe fallback).
- magefile: remove 8 pre-existing stale-recording exclusions. They
  masked unrelated regressions in preflight's advisory playback step.
  Tracked for re-recording in Azure#7780.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Staticcheck SA4006 flagged the 'found' return from env.LookupEnv as
never used. The whole branch was dead code after the Phase 2 rewrite
(producer-first) — with no statement after it in the loop body,
'continue' became equivalent to fallthrough.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- service_target_containerapp.go: consolidate templateHashMu + envSaveMu
  into a single envMu (sync.RWMutex) guarding all writes to e.dotenv,
  eliminating the concurrent map-writes race between parallel deploys.
  Added lock to the preprovision RESOURCE_EXISTS handler as well.

- layer_deps.go: drop the orphan `env *environment.Environment`
  parameter from AnalyzeLayerDependencies (unused after 4cf47fa removed
  the last consumer). Remove the environment import. Update all three
  non-test callers and the ten test call sites + stale comments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- service_target_containerapp.go: envHashKey now uses `environment.Key`
  to normalize hyphens to underscores. For services named `my-api` the
  previous `strings.ToUpper` would produce `SERVICE_MY-API_TEMPLATE_HASH`
  which godotenv's parser rejects on reload (variable names must match
  `[A-Za-z0-9_.]`), leaving the hash un-reloadable on subsequent runs.

- deploy.go / deploy_progress.go: deploy-graph progress tracker now
  classifies terminal states. Previously every non-nil error from
  OnStepDone mapped to `phaseFailed`, so services that were skipped
  due to dependency-cascade (StepSkippedError) or parent-cancellation
  (context.Canceled) rendered as "Failed" in the UI. Added a new
  `phaseSkipped` terminal phase with a dedicated icon and test
  coverage, and classify the error in the OnStepDone handler.

- bicep_cache_test.go: mock predicate guarded `len(args.Args) >= 2`
  before reading `args.Args[2]` — bump guard to `>= 3` to eliminate
  panic risk.

- bicep.go: buildCacheKey doc comment claimed "returns (\"\", nil) on
  unreadable module" but implementation propagates the error (which
  Build treats as cache-miss). Updated comment to match behavior.

PR description also updated to list all three tests in
`excludedPlaybackTests` (the third, Test_CLI_InfraCreateAndDeleteUpperCase,
was previously omitted from the list).

Does NOT address copilot finding on bicep_provider.go:799 (claimed
loop-var capture on `resId`): false positive — `resId` is declared
with `:=` inside the loop body, so each iteration has its own
block-scoped variable. Reply posted separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three high-severity regressions surfaced in re-review on 11e5473:

1. azd up dropped prepackage/postpackage shell hooks and the
   ProjectEventPackage Go event because the consolidated up flow no
   longer dispatches sub-commands through cobra middleware. Add four
   new graph nodes (cmdhook-prepackage, event-prepackage,
   event-postpackage, cmdhook-postpackage) plus a new
   serviceGraphOptions.packageExtraDeps field so per-service package
   steps gate on event-prepackage. cmdhook-postpackage now also gates
   event-predeploy so the old workflow's postpackage->predeploy
   ordering is preserved.

2. provision_graph.go's second projectEventArgs block was missing the
   "preview" key after the first-pass fix only updated line 131.
   Extension handlers type-asserting args["preview"].(bool) would get
   the zero value here too. Emit "preview": false explicitly (this
   path is non-preview only; preview goes through provisionPreview).

3. shouldUseDirectRevisionAPI in service_target_containerapp.go
   persisted the new template hash to env BEFORE the ARM deploy ran.
   A failed deploy then left a stored hash that caused the next run
   to take the direct-revision optimization path against unprovisioned
   resources. Refactor into side-effect-free evaluateTemplateHash that
   returns (useDirect, currentHash, changed); persistence now happens
   in the caller AFTER successful ARM deploy. Read still occurs under
   envMu to protect the shared env map from concurrent service deploys.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…odes and template-hash refactor

Brings spec.md in line with the Pass 4 fixes in 9176db0:
- Add prepackage/postpackage to the cmdhook-* hook list and update
  the arch topology comment to show the parallel package chain.
- Restructure the Unified Up node layout into Provision/Package/
  Deploy sub-chains; package-<svc> no longer has zero deps under
  azd up (gated on event-prepackage via packageExtraDeps).
- Fix the Thread Safety table: shouldUseDirectRevisionAPI used the
  caller's envMu, not separate templateHashMu/envSaveMu (which never
  existed). Rewrite the Direct Revision API shortcut paragraph to
  describe evaluateTemplateHash + post-deploy persistence.
- Update semantic difference #1: predeploy hook now runs concurrently
  with the package chain; event-predeploy gates publish/deploy AND
  depends on cmdhook-postpackage so postpackage->predeploy ordering
  is preserved for the event handlers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
HIGH (concurrency regressions surfaced by parallel scheduler):
- Add internal sync.RWMutex to *environment.Environment so parallel hooks
  and services writing dotenv keys can't panic with concurrent map writes
- Add saveMu to environment manager so parallel Save/Reload calls don't
  interleave file I/O against the same .env
- Add sync.Mutex to kubectl.Cli singleton (SetEnv/SetKubeConfig/Cwd
  readers snapshot via snapshotState before exec/template work)
- kustomize.Cli.WithCwd now returns a shallow copy instead of mutating
  the singleton, so parallel kustomize edit calls don't fight over cwd
- Add package-level aksEnvMu to service_target_aks.go around
  SetServiceProperty + envManager.Save sequences (mirrors containerapp envMu)

MEDIUM/LOW (behavior + UX):
- up_graph.go: only apply provision-specific error wrapping when a
  provision-tagged step actually failed; package/publish/deploy errors
  now pass through verbatim
- Honor AZD_DEPLOY_CONCURRENCY as a fallback for AZD_UP_CONCURRENCY
- CHANGELOG entries for the concurrency fixes, banner text change,
  AZD_DEPLOY_CONCURRENCY fallback, and FailFast in-flight semantics

Includes a TestEnvironment_ConcurrentDotenvSet regression test
(32 goroutines x 200 writes) to lock in the Environment fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses three silent-miss cases in the layer dependency analyzer that
produced non-deterministic correctness bugs in parallel multi-layer
provision (sequential mode worked by accident):

  1. Non-literal readEnvironmentVariable(varName) in .bicepparam files
     was silently dropped (regex only matched single-quoted literals).
  2. ARM template expressions like [parameters('foo')] in
     .parameters.json files were silently dropped (regex only matched
     ${VAR} substitutions).
  3. param x = readEnvironmentVariable('Y') defaults inside .bicep
     files were never scanned (bicep parsed only for outputs, not refs).

When the parser encounters a syntax pattern it cannot resolve to a
literal env-var name, the consuming layer now falls back to depending
on all earlier layers (safe-by-default). The fast path for parsable
layers stays parallel.

Hook-mediated edges (e.g. a postprovision hook in layer A writes an
env var that layer B's bicepparam reads) cannot be inferred by any
static analyzer. A new  + 'infra.layers[].dependsOn' +  field in azure.yaml
lets authors declare these explicitly. Explicit edges union with
detected edges; cycles, self-references, and unknown layer names are
validated.

Tests: 9 new tests added covering each silent-miss case, the
safe-fallback path, the bicep param-default scan, and explicit
dependsOn validation (unknown layer, self, cycle).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…inner debug log

Item A (docs): Add cli/azd/docs/concurrency-model.md documenting the locking
contracts for environment.Environment, environment.Manager, kubectl.Cli,
containerAppTarget/aksTarget, and serviceManager. Includes a short history
note and an Adding new concurrent state checklist. Linked from
cli/azd/AGENTS.md under a new Concurrency subsection so future contributors
discover the rules before adding write paths to these types.

Item B (UX): Restore intra-phase progress detail in the per-service tracker
during graph-driven azd deploy / azd up. addServiceStepsToGraph now accepts
an optional onPhaseProgress callback; an internal newPhaseProgress helper
drains async.Progress[ServiceProgress] events from each phase and forwards
ServiceProgress.Message to the callback. deploy.go wires this to
da.updateProgress so the tracker's Detail column shows messages like
'Pushing image' / 'Updating container app' instead of staying blank between
phase transitions. up_graph.go leaves it nil (no tracker) — preserving
previous behavior.

Item C (diagnosability): Replace silentSpinnerConsole's no-op
ShowSpinner/StopSpinner methods with log.Printf calls that record the
dropped spinner title at debug level. Suppressing the visual spinner in the
graph-driven path is intentional, but completely swallowing the calls made
graph regressions hard to debug — the log line preserves the intent in azd
trace logs without re-introducing the broken visual spinner.

Refs: Azure#7776 (comment) (vhvb1989 pass 5)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#3 — Cross-layer hook ordering contract

Document on runProvisionSingleLayer's docstring that when the dependency
graph contains an edge B -> A, layer B's step is scheduled only after
layer A's full 7-stage lifecycle (including post-provision event AND
layer post-hooks) returns. This is enforced at the scheduler layer
because addStep treats the entire runProvisionSingleLayer invocation as
one graph node. Layers that need this guarantee for hook-mediated env
values (where A's postprovision hook writes a value B's bicepparam
reads) must declare the edge explicitly via dependsOn — the static
analyzer cannot see hook side-effects.

Add TestProvisionLayersGraph_DependentLayerWaitsForPostHooks in
provision_graph_test.go — drives the guarantee at the scheduler layer
by simulating each step's body as the full lifecycle and asserting B's
start observes A's post-hook completion.

#4 — Multi-layer adoption telemetry + awesome-azd audit

Add four ProvisionLayer* attribute keys in
internal/tracing/fields/fields.go alongside the existing exegraph.*
keys:

  - provision.layer.count                     (declared layers)
  - provision.layer.max_parallel              (achievable parallelism)
  - provision.layer.safe_fallback_count       (hasUnknown engagements)
  - provision.layer.explicit_dependson_count  (dependsOn adoption)

Surface bicep.LayerDependencies.SafeFallbackLayers from
AnalyzeLayerDependencies (counts only — the fallback edges were already
in Edges; the new field just lets callers report how many layers hit
safe-fallback without re-deriving the count).

Wire emitMultiLayerProvisionTelemetry on the multi-layer path in
provision_graph.go to attach the four attributes to the ambient command
span via tracing.SetAttributesInContext. All attributes are
SystemMetadata + PerformanceAndHealth — counts only, no template
content — so they ship under the existing telemetry consent.

Document the four attributes plus the awesome-azd audit finding in
docs/specs/exegraph/spec.md (new lessons-learned point Azure#13). The audit
(org:Azure-Samples filename:azure.yaml for layers:) confirms vhvb's
suspicion: zero official templates use multi-layer infra.layers[]
today; only three community user repositories declare it. The new
telemetry will let us track adoption going forward.

Refs: Azure#7776 (vhvb1989 pass 5, items 3 and 4)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The misc cspell config (used by the cspell-lint workflow on
non-cli paths including docs/specs/exegraph/) does not pick up
cli/azd/.vscode/cspell-azd-dictionary.txt. Add 'dependson' to the
exegraph file override so the spec docs lint cleanly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The multi-layer parallel provision path cloned each layer's environment
from the parent process's in-memory deps.env at step 0 and merged
deployment outputs back at step 4 via envManager.Save. Hooks and event
handlers run as subprocesses that write to disk via their own
envManager — the parent's deps.env was never reloaded. Two related
bugs followed:

1. Step 4 Save would serialize the (stale) in-memory deps.env to disk,
   silently clobbering any FOO=bar that this layer's pre-hook wrote via
   'azd env set'.

2. Subsequent layers ordered after this one (via dependsOn or detected
   edge) would clone deps.env.Dotenv() at their step 0 and miss any
   FOO=bar this layer's post-hook wrote, making 'dependsOn' silently
   incomplete for hook-mediated edges — which is exactly the case
   dependsOn was added to handle.

Fix: reload deps.env from disk before step 4's Save, and add a final
step 8 reload after step 7 (post-hooks) so downstream layers see all
hook-mediated writes. Both reloads happen under envMu.

Also extracts mergeLayerOutputsLocked / reloadSharedEnvLocked helpers
and adds focused tests proving the propagation contract end-to-end:

  - TestMergeLayerOutputsLocked_PreservesSubprocessWrites — mutates
    disk behind deps.env's back, asserts merge does not clobber.
  - TestReloadSharedEnvLocked_PropagatesToDownstreamLayer — asserts a
    downstream layer's clone sees disk state after reload.

Renames the previous TestProvisionLayersGraph_DependentLayerWaitsForPostHooks
to TestProvisionLayersGraph_DependsOnEdgeOrdering to honestly reflect
that it tests scheduler-level DependsOn semantics, not the full
runProvisionSingleLayer lifecycle.

Other detector hardening surfaced in the same review pass:
- armExpressionRe now uses [^\\]] so ARM expressions with escaped
  quotes ('json(\\'{...}\\')') are still detected.
- discoverParamEnvRefs escalates non-NotExist read errors to
  hasUnknown=true (was: silently dropped edges).
- Options.DependsOn gains a json tag for schema parity.

Refs: Azure#7776

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Spec now reflects the hook-mediated env propagation contract added in
84286f6:

- Implementation Notes #8 expanded to cover the full 8-step lifecycle
  (pre-hooks -> pre-event -> Deploy -> merge -> service event ->
  post-event -> post-hooks -> reload), the merge step's pre-Save
  reload, the new step 8 final reload, and why concurrent siblings
  intentionally don't see each other's mid-flight hook writes.
- Thread Safety table gains a provision_graph.go row pinning the
  envMu (deps.env reads/writes) and hookMu (handler serialization)
  contracts.
- Test coverage row for provision_graph_test.go updated from 3 -> 7
  tests with descriptions of the new merge / reload tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rdings

- cspell.misc.yaml: allow 'appsettings' in docs/specs/exegraph/**

- provision_graph_test.go: //nolint:gosec G703 on tempdir WriteFile (envPath from t.TempDir())

- magefile.go: add 7 playback tests to excludedPlaybackTests — all stale due to

  feat/exegraph graph-driven provision introducing new resourcegroups list

  probe and provision-layer-0 deployment interactions. Must be re-recorded

  in record mode with live Azure credentials before merge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The unified up exegraph absorbs package and provision phases in-process,

so the cobra middleware no longer fires nested cmd.package / cmd.provision

spans (legacy workflow runner spawned them as child processes).

Emit synthetic spans from UpGraphAction.Run as children of cmd.up so the

telemetry contract (parent/child shape, SubscriptionIdKey, EnvNameKey,

CmdEntry, CmdFlags) matches the legacy workflow output. Spans cover the

whole Run() duration (approximate; the phases overlap in the unified

graph) and end in package -> provision order so the trace file lists

them in the legacy sequence.

Fixes Test_CLI_Telemetry_NestedCommands regression in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Old sequential deploy consumed services topo-sorted by Uses via
ImportManager.ServiceStableFiltered, so declared service-to-service
deps (e.g. web uses: [api]) implicitly serialized via iteration order.
The new parallel graph preserved topo iteration but dropped the edge,
letting web.predeploy race api.postdeploy and see stale env values.

Translate svc.Uses entries that name other services into
"deploy-<svc>" edges on the deploy step. Resource-valued entries
are skipped (provision layer owns them), matching the logic in
ImportManager.sortServicesByDependencies. Edges dedupe against the
Aspire build-gate so concurrent rules don't emit duplicates.

Adds TestDeployServicesGraph_UsesDependencies and
TestDeployServicesGraph_UsesWithBuildGate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…que correlation IDs

Parallel deploys of multiple Container Apps services via ACR remote build
could end up serving the same image under different repository names. Root
cause: ACR's GetBuildSourceUploadURL derives the upload blob path from the
caller's x-ms-correlation-request-id header. azd's correlation policy set
that header from the root OpenTelemetry trace ID, which is shared across
every request in a single `azd up` invocation, so parallel uploads
collided on the same blob and the last writer won.

Fix:
- ACR remote-build RegistriesClient now wraps its options with a per-call
  policy that overrides x-ms-correlation-request-id with a fresh UUID per
  request. Minimal, scoped to the upload path.
- NewMsClientRequestIdPolicy and NewMsGraphCorrelationPolicy now emit a
  fresh UUID per HTTP request, matching the ARM and Graph specs which
  require x-ms-client-request-id / client-request-id to be unique per
  call. Defense in depth against other Azure services that use these
  headers as dedupe / idempotency keys.
- NewMsCorrelationPolicy keeps trace-ID-derived correlation (correct by
  spec for grouping related requests).

Tests:
- New unit tests assert unique UUIDs per request for both per-request
  policies and that trace-ID behavior is preserved for the session
  correlation policy.
- New functional test `Test_CLI_Up_Down_ContainerApp_RemoteBuild_MultiService`
  deploys two Container Apps in parallel via remote build and asserts each
  service serves its own identity, guarding against regression.

Fixes Azure#7776

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…provision

Addresses two HIGH findings from wbreza review on PR Azure#7776.

H1 — local_file_data_store.go: parallel service hooks spawning `azd env set`
subprocesses each held only the in-process saveMu, so the truncate-rewrite
in Save raced across processes (last writer silently clobbered another
writer's keys). Acquire a gofrs/flock-based OS-level file lock around the
reload-merge-write cycle in both Save and Reload, write to a sibling tmp
file then atomically rename via osutil.Rename (Windows-safe with retry on
sharing-violation). configManager.Save is moved under the same lock to
prevent torn JSON config reads. manager.Get's remote-fallback Save path
now also takes saveMu so in-process callers stay serialized too.

Regression test Test_LocalFileDataStore_ConcurrentSave_NoLostUpdate spawns
8 concurrent LocalFileDataStore instances against the same env directory
(bypassing in-process saveMu, mimicking subprocesses) and asserts every
writer's keys survive.

H3 — up_graph.go: cmdhook-prepackage and cmdhook-preprovision were both
graph roots, so the scheduler could start them concurrently. Pre-PR azd
up ran package then provision sequentially, so users could rely on
prepackage writing env-vars (e.g. computing an image tag) that
preprovision reads in a bicepparam file. Add DependsOn:
[prePackageHookStep] on preProvisionHookStep to preserve the prior
ordering (the two shell hooks now serialize; package and provision
themselves still overlap as intended).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mq follow-up to de57ff4 addressing secops + smells/arch findings on
the H1 (cross-process .env race) fix:

- Make lockPath unexported (was LockPath; no external callers).
- Replace osPermDir local const with osutil.PermissionDirectory.
- Extract acquireEnvLock(ctx, env) + releaseEnvLock helpers; both
  Reload and Save now share one code path.
- Use TryLockContext(ctx, 50ms) instead of unbounded Lock(): a wedged
  flock holder (e.g. hung 'azd env set' subprocess; LockFileEx on
  Windows is not signal-aware) no longer freezes azd; Ctrl-C and
  context deadlines now cancel the wait. (secops M-1)
- manager.Get's remote-fallback Save now releases saveMu via defer
  inside a closure instead of two Unlock sites. (smells/arch #7)

No behavior change for the happy path; tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mq follow-up addressing secops L-1 and L-2:

- L-1: Save now sweeps stale .env.tmp-* siblings (>1h old) under the
  flock before creating a new one. Defends against tmp file accumulation
  if azd is SIGKILL'd or the host loses power between CreateTemp and
  Rename. The flock guarantees no concurrent in-flight tmp file, so
  the sweep is race-free.
- L-2: CHANGELOG note documenting that .env files are now persisted
  with mode 0600 (was umask-dependent, typically 0644). The atomic
  os.CreateTemp + Rename in de57ff4 tightened the mode as a side
  effect; calling it out explicitly in release notes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pre-exegraph, `azd up` spawned `azd package` and `azd provision` as child processes; each flushed its own batch processor independently, so the trace file naturally listed cmd.package -> cmd.provision -> cmd.up in End() order.

Post-exegraph, the unified up command emits all three cmd.* spans through a single in-process BatchSpanProcessor. The OTEL Go SDK does not guarantee FIFO ordering of spans across batches, so the strict ordering assertion is flaky on busy CI environments (4/4 ADO platforms failed deterministically while local Windows passed 5/5).

Refactor the test to collect cmd.* spans by name and verify each span's attributes individually. This preserves all existing per-span assertions (TraceID, SubscriptionId, EnvName, CmdEntry, CmdFlags, CmdArgsCount) without relying on flush order.

Also drop the now-stale ordering comment in up_graph.go that documented the End() order contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… creds

Test_CLI_Up_Down_ContainerApp_RemoteBuild_MultiService called
recording.Start(t) before its skip check. recording.Start does t.Fatalf
when the cassette is missing, so CI without cassettes AND without
AZURE_TENANT_ID hard-failed instead of skipping.

Fix: check cassette existence + AZURE_TENANT_ID before recording.Start,
skip cleanly if both absent. Keep the original post-Start nil-session
skip as defensive guard.

(The companion completion_test.go phantom-failure fix from this same
commit was superseded by upstream PR Azure#7714 during rebase, which adds
a trailing newline in the renderer plus stdout capture.)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-28T23:07:52Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​wbreza Thanks for the thorough re-review and the resolution tracking table. Here's the triage:


Critical

C1 — Missing defer Unlock() — Fixed in 737ef70. Good catch — the scheduler recovers panics (runStep has defer recover()), so a panic between Lock/Unlock leaves the mutex held permanently while execution continues. All 4 non-defer pairs fixed:

  • StoreContext / StoreResult (service_graph.go)
  • runProvisionSingleLayer envMu (provision_graph.go)
  • CopyRuntimeStateTo hookGuard (service_config.go)

C2 — Integration tests for UpGraphAction — Agree this needs tracking. Will create an issue rather than expand PR scope further at 11K+ lines and 7 review rounds.


High

H3 — readFileWithContext goroutine leak — Partially valid. The buffered channel (make(chan result, 1)) prevents the send-block leak path described. However, if os.ReadFile stalls on a network/FUSE mount, the goroutine does linger after context cancellation. This is the intentional tradeoff documented in the function's comment: unblock the caller while accepting a bounded goroutine residual. Since this reads a finite number of local Bicep layer files, the practical risk is negligible. No change.

H4 — errgroup drops errors in RG check — By design. errgroup.Wait() returning the first error is the standard Go errgroup contract. For this RG existence check, any single failure is sufficient to invalidate cached deployment state — aggregating all errors would require changing the concurrency pattern (errors.Join + no context cancellation) and adds unnecessary ARM API pressure on an already-errored path.

H5 — AZD_DEPLOY_TIMEOUT negative validation — Already handled. The env var code path at deploy.go:522 explicitly checks seconds <= 0 and returns an error: "must be greater than 0 seconds".

H6 — FailFast migration guidance — Partially agree. Will add a console message when step cancellation starts ("Cancelling remaining steps — in-flight operations may take time to complete") in a follow-up.

H7 — uses: silent drop — The upstream validateServiceDependencies() in importer.go catches unknown service names before graph construction. The continue at service_graph.go:457 is defense-in-depth that intentionally skips resource-valued uses: entries (which are valid but don't create service-to-service edges). Adding a warning log here would produce false alarms for resource dependencies.


Medium / Low (8-15)

  • M8 (releaseEnvLock): Logging is the correct behavior — returning an error from a deferred cleanup requires named returns and errors.Join, adding complexity for a rare path.
  • M9 (RunOptions.Validate): Nice-to-have API hygiene, not required for internal usage.
  • M10 (Self-reference in AddStep): Intentional separation — AddStep validates local shape, Validate() owns graph-level invariants, and RunWithResult calls Validate() before execution.
  • M11 (Callback concurrency docs): Already documented — OnStepStart/OnStepDone comments say "must be safe for concurrent use."
  • M12 (reloadSharedEnvLocked I/O): Correct tradeoff — serialized I/O under envMu is needed for correctness on shared state. Env dirs are local/small.
  • M13 (Graph.priority undocumented): Already documented — struct field comment + Priority() godoc both say "computed lazily" and "cached on first call."
  • L14 (Long lines): Pre-existing, not introduced by this PR.
  • L15 (adaptivePoller docstrings): Will address if touching those lines.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T14:20:25Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Resolution Summary Update — Rounds 10-11 (2026-04-28/29)

john0isaac — Hang report (2026-04-28)

Finding Resolution Commit Status
azd up hangs after provisioning (terraform + bicep) Three fixes: (1) publish step timeout, (2) signal handler fix, (3) diagnostic logging e99875eb Resolved

wbreza — Pass Azure#10 (Re-Review, 15 findings)

# Sev Finding Resolution Status
C1 CRITICAL Missing defer Unlock() in 4 paths Fixed (StoreContext, StoreResult, CopyRuntimeStateTo) 737ef70
C2 CRITICAL Integration tests for UpGraphAction Deferred — will track as issue Deferred
H3 HIGH readFileWithContext goroutine leak Partially valid — buffered channel prevents send-block; stalled os.ReadFile is bounded/intentional tradeoff Won't fix
H4 HIGH errgroup drops errors in RG check By design — first error sufficient to invalidate state Won't fix
H5 HIGH AZD_DEPLOY_TIMEOUT negative validation Already handled at deploy.go:522 (seconds <= 0 check) N/A
H6 HIGH FailFast migration guidance Partially agree — console message in follow-up Deferred
H7 HIGH uses: silent drop of unknown names Upstream validateServiceDependencies catches it; continue skips resource deps intentionally Won't fix
M8 MED releaseEnvLock error discarded Logging is correct for deferred cleanup Won't fix
M9 MED RunOptions lacks Validate() Nice-to-have, internal API Won't fix
M10 MED Self-reference not caught in AddStep Intentional — Validate() owns graph invariants, RunWithResult calls it Won't fix
M11 MED Callback concurrency docs Already documented in comments N/A
M12 MED reloadSharedEnvLocked sequential I/O Correct tradeoff for shared-state correctness Won't fix
M13 MED Graph.priority undocumented Already documented in struct comment + godoc N/A
L14 LOW Long lines >125 chars Pre-existing N/A
L15 LOW adaptivePoller docstrings Will address if touching those lines Deferred

Self-deadlock discovery (2026-04-28, post-push)

Finding Resolution Commit Status
envMu defer in runProvisionSingleLayer causes self-deadlock (mergeLayerOutputsLocked re-acquires) Partially reverted 737ef70 — only the envMu change; other 3 defer fixes remain a93ef86 Resolved

Updated stats

  • Total review rounds: 10 (wbreza x6, weikanglim x1, hemarina x1, vhvb1989 x1, wbreza re-review x1)
  • Total findings addressed: 60+ with commit evidence
  • Resolution rate: 95%+
  • Preflight: 9/9 pass on HEAD
  • CI: All checks green

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by john0isaac on 2026-04-29T16:20:42Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​jongio CTRL + C is fixed only one time is enough to escape thanks for fixing.

Bicep still feels stuck to me but I think below points might clarify some things.
image

terraform works but after provisioning you get nothing no print or logs from deployment stage so it feels stuck
After provisioning terminal went silent for 5 minutes no progress or prints or anything then it got back to me
image

I feel like maybe deployment prints are not coming out? since it maybe deploying in background but i'm not seeing it..

I think I might be correct there has been a deployment pushed to azure from bicep template
image

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T17:16:30Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​john0isaac Thanks for the detailed report with screenshots! You were right — deploying was happening in the background but azd up wasn't showing any progress during that phase (it only logged to debug output). Root cause: azd deploy (standalone) has a live progress table showing each service's phase (Packaging → Publishing → Deploying → Done), but azd up was missing this — it only had invisible log.Printf calls. Fix (commit 2eaad92): azd up now shows the same live deploy progress table that azd deploy uses. The table starts rendering right after provisioning completes (when publish/deploy steps begin), so you'll see real-time feedback for each service throughout the deploy phase. The experience should now look like: 1. Provisioning progress (resource status lines) — unchanged 2. NEW: Deploy progress table appears after provisioning completes, showing each service's current phase and elapsed time 3. Final summary with endpoints — unchanged Please re-test with the latest push and let me know if the experience feels right!

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T18:37:22Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Resolution Summary Update - wbreza Pass 3 (2026-04-29)

wbreza - Pass 3 (APPROVED, 7 findings)

# Sev Finding Resolution Status
M1 MED Lock order docs for saveMu + subprocess hooks Tracked: Azure#7969 Deferred
M2 MED Integration tests for UpGraphAction.Run() Tracked: Azure#7970 Deferred
M3 MED uses: silently drops unknown service names Added debug log at continue site Fixed in 20a2dd2
M4 MED Environment lock churn on hot path Tracked: Azure#7971 Deferred
M5 MED Callback blocking risk in onPhaseProgress Added non-blocking contract doc Fixed in 20a2dd2
M6 MED Layer deps regex fallback should log Added log when falling back to serial Fixed in 20a2dd2
L7 LOW ANSI injection via service names Tracked: Azure#7972 Deferred

john0isaac - Silent deploy progress (2026-04-29)

Finding Resolution Commit Status
azd up shows no progress during deploy phase after provisioning Added live deploy progress table (same as azd deploy) 2eaad92 Fixed

Cumulative stats (all rounds)

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T18:51:45Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​john0isaac The deploy progress fix and the earlier hang fix are both pushed now. Could you retest azd up when you get a chance and confirm both issues are resolved?

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T20:32:30Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

PR Status Update

All CI checks are green (lint, build, ADO pipeline — 31/31 passing). All review threads resolved.

Waiting on:

  • @​wbreza — final sign-off (review decision still shows REVIEW_REQUIRED despite approval)
  • @​john0isaac — retest confirmation that the deploy progress fix and hang fix work as expected

Ready to merge once we have the above.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by john0isaac on 2026-04-29T21:41:36Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​jongio I'm currently testing..

ERROR: loading environment: saving local environment, locking .env: context canceled

Not sure if this is related or not but this is not the first time I see this error.
It only happens the first time you run azd up after you install in a fresh environment.

Somewhere something is being cached that fixes this issue and it's not cached in .azure/ folder as I tried deleting .azure/ to replicate but was not able to.

image

Deployment progress is looking awesome

terraform

Minor UI Suggestion to not indent it like it's indented right now.. or add a title before it like Deploying and indent it under title if there will be not titles maybe add new empty line between outputs and deployment progress table.
image

image

Bicep

Now I get why it's indented to align with bicep output but in terraform it looks unaligned :D
image

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T21:56:03Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​john0isaac Thanks for testing and confirming the deploy progress works! 🎉

Regarding your two items:

  1. locking .env: context canceled — This looks pre-existing (env locking code is unchanged in this PR). Filed Bug: 'locking .env: context canceled' on first azd up in fresh environment Azure/azure-dev#7976 to investigate the first-run race condition separately.

  2. Deploy progress table indentation — Good UI suggestion. Filed UI: Deploy progress table indentation/spacing during azd up (Terraform) Azure/azure-dev#7977 to address the spacing/header for Terraform output as a follow-up polish item.

Appreciate the thorough testing!

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T22:00:31Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Final Resolution Summary — All Feedback Accounted

Current PR Status

  • CI: All 31 checks passing ✅
  • Approvals: vhvb1989 ✅ + wbreza ✅
  • Unresolved threads: 0
  • Merge status: MERGEABLE (waiting on REVIEW_REQUIRED gate)

Follow-Up Issues Filed

# Issue Source Category
Azure#7908 Per-service previewer output buffering for concurrent deploy weikanglim W3 UX
Azure#7909 Extend exegraph to handle custom workflow processing weikanglim W5b Feature
Azure#7910 Simplify up.go concurrent setup — reduce graph/legacy branching weikanglim W5c Refactor
Azure#7969 Document lock acquisition order for saveMu + subprocess hooks wbreza Pass 3 M1 Docs
Azure#7970 Add integration tests for UpGraphAction.Run() wbreza Pass 3 M2 Testing
Azure#7971 Investigate environment lock contention under parallel deploys wbreza Pass 3 M4 Perf
Azure#7972 Sanitize service names in deploy progress table (ANSI injection) wbreza Pass 3 L7 Security
Azure#7976 Bug: 'locking .env: context canceled' on first azd up john0isaac Bug
Azure#7977 UI: Deploy progress table indentation/spacing (Terraform) john0isaac UX
Azure#7978 Docs: Document concurrency model for parallel execution vhvb1989 Docs
Azure#7979 UX: Restore sub-phase progress detail in deploy progress table vhvb1989 UX
Azure#7980 Review silentSpinnerConsole design for extension compatibility vhvb1989 Design

Reviewer Feedback Disposition

wbreza (7 review passes)

  • Pass 1 (10 findings): All fixed ✅
  • Pass 2 (1 finding — concurrent map race): Fixed ✅
  • Pass 3 verified prior fixes ✅
  • Pass 4 (regressions): All fixed ✅
  • Pass 5 (23 findings): 18 fixed, 5 verified false positives ✅
  • Pass 6 re-review: 14/16 fixed, 2 deferred to issues ✅
  • Pass 7 (APPROVED): 3 quick fixes applied, 4 tracked as issues ✅

weikanglim (2 review passes)

  • W1–W11: 7 fixed with code removed (−212 lines), 2 disagreed with reasoning, 3 tracked as issues ✅

hemarina (1 review — DISMISSED)

  • Race condition concern: Verified resolved (Environment now internally thread-safe) ✅

vhvb1989 (APPROVED)

john0isaac (testing)


Cumulative Stats

  • Total review rounds: 11+ (wbreza ×7, weikanglim ×2, hemarina ×1, vhvb1989 ×1, john0isaac testing ×3)
  • Total findings addressed with commits: 65+
  • Follow-up issues created: 12
  • Lines removed through review: 200+
  • Resolution rate: 100% (all items either fixed or tracked)

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by JeffreyCA on 2026-04-29T22:21:16Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

  1. locking .env: context canceled — This looks pre-existing (env locking code is unchanged in this PR). Filed Bug: 'locking .env: context canceled' on first azd up in fresh environment #7976 to investigate the first-run race condition separately.

@​jongio it looks like some .env locking code was introduced by this PR (e.g. in https://​github.com/Azure/azure-dev/pull/7776/changes/f62e168354d1542785e9c6a75e54ec59e2f3c6c0), can you reconfirm?

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T22:23:57Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​JeffreyCA Good catch — you're right. The error message comes from acquireEnvLock in local_file_data_store.go:78 (commit f62e168 in this PR).

The previous code used unbounded flock.Lock() which would block forever and never surface this error. The new TryLockContext(ctx, 50ms) respects context cancellation, so a canceled context during env save now produces a visible error where it was previously hidden (as an indefinite hang).

The underlying cause (context being canceled during first-run env save) needs investigation — updated Azure#7976 accordingly. This may be a case where we need to use a longer/independent context for the save operation on the first-run path.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T23:00:23Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​vhvb1989 Both bugs that were filed as follow-ups have been fixed in this PR: - Azure#7976 (.env context-canceled) — Fixed in 1ac8f047e: Save() now uses context.WithoutCancel + 30s timeout - Azure#7981 (deploy duration mismatch) — Fixed in 1ac8f047e: service timer no longer starts during package phase Both issues are closed. No bugs left as follow-ups — only enhancements remain. Could you re-review when you get a chance?

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by JeffreyCA on 2026-04-29T23:22:01Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

There are some small UX glitches with the Previewer output (easy to reproduce by running azd deploy on project that uses containerapp and remoteBuild:

Final output w/o exegraph (previewer content disappears):
image

Final output w/ exegraph (previewer content persists and status table appears multiple times):
image

Recording during deploy:

https://​github.com/user-attachments/assets/ab2777d4-ad22-4b46-bc6c-3cb1b0b0d89c

Not a blocker for this PR but hopefully that could be addressed

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-29T23:36:20Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​JeffreyCA Fixed in �93fb5659. The issue was that the deploy progress table and the Docker build previewer were both trying to control the terminal simultaneously. The ContainerHelper uses a DI-injected console that bypassed the silentSpinnerConsole wrapper. The fix adds a PreviewerSuppressor interface on the shared console — when the progress table is active, ShowPreviewer() returns io.Discard so Docker output is silently dropped instead of corrupting the table display. The previewer output (Docker layer downloads, remote build logs) won't be visible during the deploy phase anymore. If we want to surface that info, we can pipe selected status lines into the table's Detail column as a follow-up (tracked in Azure#7979).

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by vhvb1989 on 2026-04-29T23:46:41Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

When there is an error from provision for projects not using layers, the error makes reference to layer-0
Would that be confusing to customers?

image

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-30T00:48:46Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

@​JeffreyCA Could you retest the previewer glitch with the latest push (\�93fb565)? The Docker output should no longer bleed through the progress table during remote builds.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-30T06:08:52Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Good catch! Fixed in 24c5b7b — single-layer projects (the common case) now show just provision in error messages instead of provision-layer-0. The indexed naming only kicks in for multi-layer projects where it's needed to distinguish between layers.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-30T13:46:46Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

/azp run azure-dev - cli

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by azure-pipelines[bot] on 2026-04-30T13:47:16Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Azure Pipelines successfully started running 1 pipeline(s).

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by vhvb1989 on 2026-04-30T17:52:50Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Known limitation: interactive hooks during parallel execution

Opened Azure#7994 to track this.

The exegraph scheduler runs service-level steps (package, deploy) concurrently across services, but there is no guard preventing multiple interactive: true hooks from competing for the console at the same time. The syncConsole wrapper intentionally skips interactive methods, and the scheduler has no concept of "interactive" nodes.

Project-level hooks are safe (single DAG nodes with serializing edges). The risk is with service-level hooks across multiple services.

This is likely an edge case for user-defined hooks, but extensions also support lifecycle hooks and azd cannot know ahead of time whether an extension hook will prompt the user — making this harder to validate statically.

Possible mitigations range from disabling parallelism when interactive hooks are detected, to introducing a console ownership protocol where hooks/extensions declare they need exclusive console access. See Azure#7994 for details.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by jongio on 2026-04-30T18:08:04Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Aspire parallel deploy fix (pushed)

@​vhvb1989 — Good catch on both questions. Here's what we've done:

Aspire projects (your second question)

Fixed in 2c63878. Aspire projects no longer need uses: for parallel deploy. The build-gate policy (aspireBuildGateKey) now implicitly enables parallel mode:

  • If any service in the deploy set returns a non-empty buildGateKey, that constitutes an explicit execution policy - the sequential fallback is skipped.
  • For Aspire: the first service builds the shared AppHost, and the rest wait only for that build, then deploy in parallel.
  • This is safe because Aspire services share only the AppHost build artifact - their individual deploys to ACA are independent (separate container images, separate ARM deployments).

Non-Aspire projects (your first question)

For non-Aspire projects without uses: dependencies, there's currently no way to opt into parallel deploy. Setting uses: [] doesn't work (indistinguishable from absent in YAML/Go). We filed Azure#7995 to track adding an explicit opt-in (likely execution.parallel: true or similar).

Summary

Scenario Behavior
Aspire services (same AppHost) Parallel after first builds AppHost
Non-Aspire with uses: deps Respects dependency ordering
Non-Aspire without uses: Sequential (safe default) - see Azure#7995 for opt-in

Happy to have you re-test with an Aspire project to validate!

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by john0isaac on 2026-04-30T20:46:25Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Everything looks good in bicep and in terraform:
image
image

You can ignore the timeout error it's an application error not related to azd.

There are no longer env locking errors in fresh environments.

@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

Originally by azure-sdk on 2026-05-02T15:31:20Z (mirrored from https://​github.com/Azure/azure-dev/pull/7776)

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:

curl -fsSL https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/install-azd.sh | bash -s -- --base-url https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776 --version '' --verbose --skip-verify

pwsh:

Invoke-RestMethod 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776' -Version '' -SkipVerify -Verbose

Windows

PowerShell install

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776' -Version '' -SkipVerify -Verbose;"

MSI install

powershell -c "irm 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/7776/azd-windows-amd64.msi' -OutFile azd-windows-amd64.msi; msiexec /i azd-windows-amd64.msi /qn"

Standalone Binary

MSI

Documentation

learn.microsoft.com documentation

title: Azure Developer CLI reference
description: This article explains the syntax and parameters for the various Azure Developer CLI commands.
author: alexwolfmsft
ms.author: alexwolf
ms.date: 05/02/2026
ms.service: azure-dev-cli
ms.topic: conceptual
ms.custom: devx-track-azdevcli

Azure Developer CLI reference

This article explains the syntax and parameters for the various Azure Developer CLI commands.

azd

The Azure Developer CLI (azd) is an open-source tool that helps onboard and manage your project on Azure

Options

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
      --docs                 Opens the documentation for azd in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for azd.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd add: Add a component to your project.
  • azd auth: Authenticate with Azure.
  • azd completion: Generate shell completion scripts.
  • azd config: Manage azd configurations (ex: default Azure subscription, location).
  • azd copilot: Manage GitHub Copilot agent settings. (Preview)
  • azd deploy: Deploy your project code to Azure.
  • azd down: Delete your project's Azure resources.
  • azd env: Manage environments (ex: default environment, environment variables).
  • azd extension: Manage azd extensions.
  • azd hooks: Develop, test and run hooks for a project.
  • azd infra: Manage your Infrastructure as Code (IaC).
  • azd init: Initialize a new application.
  • azd mcp: Manage Model Context Protocol (MCP) server. (Alpha)
  • azd monitor: Monitor a deployed project.
  • azd package: Packages the project's code to be deployed to Azure.
  • azd pipeline: Manage and configure your deployment pipelines.
  • azd provision: Provision Azure resources for your project.
  • azd publish: Publish a service to a container registry.
  • azd restore: Restores the project's dependencies.
  • azd show: Display information about your project and its resources.
  • azd template: Find and view template details.
  • azd up: Provision and deploy your project to Azure with a single command.
  • azd update: Updates azd to the latest version.
  • azd version: Print the version number of Azure Developer CLI.

azd add

Add a component to your project.

azd add [flags]

Options

      --docs   Opens the documentation for azd add in your web browser.
  -h, --help   Gets help for add.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth

Authenticate with Azure.

Options

      --docs   Opens the documentation for azd auth in your web browser.
  -h, --help   Gets help for auth.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth login

Log in to Azure.

Synopsis

Log in to Azure.

When run without any arguments, log in interactively using a browser. To log in using a device code, pass
--use-device-code.

To log in as a service principal, pass --client-id and --tenant-id as well as one of: --client-secret,
--client-certificate, or --federated-credential-provider.

To log in using a managed identity, pass --managed-identity, which will use the system assigned managed identity.
To use a user assigned managed identity, pass --client-id in addition to --managed-identity with the client id of
the user assigned managed identity you wish to use.

azd auth login [flags]

Options

      --check-status                           Checks the log-in status instead of logging in.
      --client-certificate string              The path to the client certificate for the service principal to authenticate with.
      --client-id string                       The client id for the service principal to authenticate with.
      --client-secret string                   The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
      --docs                                   Opens the documentation for azd auth login in your web browser.
      --federated-credential-provider string   The provider to use to acquire a federated token to authenticate with. Supported values: github, azure-pipelines, oidc
  -h, --help                                   Gets help for login.
      --managed-identity                       Use a managed identity to authenticate.
      --redirect-port int                      Choose the port to be used as part of the redirect URI during interactive login.
      --tenant-id string                       The tenant id or domain name to authenticate with.
      --use-device-code[=true]                 When true, log in by using a device code instead of a browser.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth logout

Log out of Azure.

Synopsis

Log out of Azure

azd auth logout [flags]

Options

      --docs   Opens the documentation for azd auth logout in your web browser.
  -h, --help   Gets help for logout.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth status

Show the current authentication status.

Synopsis

Display whether you are logged in to Azure and the associated account information.

azd auth status [flags]

Options

      --docs   Opens the documentation for azd auth status in your web browser.
  -h, --help   Gets help for status.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion

Generate shell completion scripts.

Synopsis

Generate shell completion scripts for azd.

The completion command allows you to generate autocompletion scripts for your shell,
currently supports bash, zsh, fish and PowerShell.

See each sub-command's help for details on how to use the generated script.

Options

      --docs   Opens the documentation for azd completion in your web browser.
  -h, --help   Gets help for completion.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion bash

Generate bash completion script.

azd completion bash

Options

      --docs   Opens the documentation for azd completion bash in your web browser.
  -h, --help   Gets help for bash.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion fig

Generate Fig autocomplete spec.

azd completion fig

Options

      --docs   Opens the documentation for azd completion fig in your web browser.
  -h, --help   Gets help for fig.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion fish

Generate fish completion script.

azd completion fish

Options

      --docs   Opens the documentation for azd completion fish in your web browser.
  -h, --help   Gets help for fish.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion powershell

Generate PowerShell completion script.

azd completion powershell

Options

      --docs   Opens the documentation for azd completion powershell in your web browser.
  -h, --help   Gets help for powershell.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion zsh

Generate zsh completion script.

azd completion zsh

Options

      --docs   Opens the documentation for azd completion zsh in your web browser.
  -h, --help   Gets help for zsh.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config

Manage azd configurations (ex: default Azure subscription, location).

Synopsis

Manage the Azure Developer CLI user configuration, which includes your default Azure subscription and location.

Available since azure-dev-cli_0.4.0-beta.1.

The easiest way to configure azd for the first time is to run azd init. The subscription and location you select will be stored in the config.json file located in the config directory. To configure azd anytime afterwards, you'll use azd config set.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

Options

      --docs   Opens the documentation for azd config in your web browser.
  -h, --help   Gets help for config.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config get

Gets a configuration.

Synopsis

Gets a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config get <path> [flags]

Options

      --docs   Opens the documentation for azd config get in your web browser.
  -h, --help   Gets help for get.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config list-alpha

Display the list of available features in alpha stage.

azd config list-alpha [flags]

Options

      --docs   Opens the documentation for azd config list-alpha in your web browser.
  -h, --help   Gets help for list-alpha.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config options

List all available configuration settings.

Synopsis

List all possible configuration settings that can be set with azd, including descriptions and allowed values.

azd config options [flags]

Options

      --docs   Opens the documentation for azd config options in your web browser.
  -h, --help   Gets help for options.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config reset

Resets configuration to default.

Synopsis

Resets all configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable to the default.

azd config reset [flags]

Options

      --docs    Opens the documentation for azd config reset in your web browser.
  -f, --force   Force reset without confirmation.
  -h, --help    Gets help for reset.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config set

Sets a configuration.

Synopsis

Sets a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config set <path> <value> [flags]

Examples

azd config set defaults.subscription <yourSubscriptionID>
azd config set defaults.location eastus

Options

      --docs   Opens the documentation for azd config set in your web browser.
  -h, --help   Gets help for set.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config show

Show all the configuration values.

Synopsis

Show all configuration values in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config show [flags]

Options

      --docs   Opens the documentation for azd config show in your web browser.
  -h, --help   Gets help for show.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config unset

Unsets a configuration.

Synopsis

Removes a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config unset <path> [flags]

Examples

azd config unset defaults.location

Options

      --docs   Opens the documentation for azd config unset in your web browser.
  -h, --help   Gets help for unset.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot

Manage GitHub Copilot agent settings. (Preview)

Options

      --docs   Opens the documentation for azd copilot in your web browser.
  -h, --help   Gets help for copilot.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent

Manage tool consent.

Synopsis

Manage consent rules for tool execution.

Options

      --docs   Opens the documentation for azd copilot consent in your web browser.
  -h, --help   Gets help for consent.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent grant

Grant consent trust rules.

Synopsis

Grant trust rules for tools and servers.

This command creates consent rules that allow tools to execute
without prompting for permission. You can specify different permission
levels and scopes for the rules.

Examples:

Grant always permission to all tools globally

azd copilot consent grant --global --permission always

Grant project permission to a specific tool with read-only scope

azd copilot consent grant --server my-server --tool my-tool --permission project --scope read-only

azd copilot consent grant [flags]

Options

      --action string       Action type: 'all' or 'readonly' (default "all")
      --docs                Opens the documentation for azd copilot consent grant in your web browser.
      --global              Apply globally to all servers
  -h, --help                Gets help for grant.
      --operation string    Operation type: 'tool' or 'sampling' (default "tool")
      --permission string   Permission: 'allow', 'deny', or 'prompt' (default "allow")
      --scope string        Rule scope: 'global', or 'project' (default "global")
      --server string       Server name
      --tool string         Specific tool name (requires --server)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent list

List consent rules.

Synopsis

List all consent rules for tools.

azd copilot consent list [flags]

Options

      --action string       Action type to filter by (all, readonly)
      --docs                Opens the documentation for azd copilot consent list in your web browser.
  -h, --help                Gets help for list.
      --operation string    Operation to filter by (tool, sampling)
      --permission string   Permission to filter by (allow, deny, prompt)
      --scope string        Consent scope to filter by (global, project). If not specified, lists rules from all scopes.
      --target string       Specific target to operate on (server/tool format)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent revoke

Revoke consent rules.

Synopsis

Revoke consent rules for tools.

azd copilot consent revoke [flags]

Options

      --action string       Action type to filter by (all, readonly)
      --docs                Opens the documentation for azd copilot consent revoke in your web browser.
  -h, --help                Gets help for revoke.
      --operation string    Operation to filter by (tool, sampling)
      --permission string   Permission to filter by (allow, deny, prompt)
      --scope string        Consent scope to filter by (global, project). If not specified, revokes rules from all scopes.
      --target string       Specific target to operate on (server/tool format)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd deploy

Deploy your project code to Azure.

azd deploy <service> [flags]

Options

      --all                   Deploys all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd deploy in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-package string   Deploys the packaged service located at the provided path. Supports zipped file packages (file path) or container images (image tag).
  -h, --help                  Gets help for deploy.
      --timeout int           Maximum time in seconds for azd to wait for each service deployment. This stops azd from waiting but does not cancel the Azure-side deployment. (default: 1200) (default 1200)

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd down

Delete your project's Azure resources.

azd down [<layer>] [flags]

Options

      --docs                 Opens the documentation for azd down in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Does not require confirmation before it deletes resources.
  -h, --help                 Gets help for down.
      --purge                Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env

Manage environments (ex: default environment, environment variables).

Options

      --docs   Opens the documentation for azd env in your web browser.
  -h, --help   Gets help for env.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config

Manage environment configuration (ex: stored in .azure//config.json).

Options

      --docs   Opens the documentation for azd env config in your web browser.
  -h, --help   Gets help for config.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config get

Gets a configuration value from the environment.

Synopsis

Gets a configuration value from the environment's config.json file.

azd env config get <path> [flags]

Options

      --docs                 Opens the documentation for azd env config get in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config set

Sets a configuration value in the environment.

Synopsis

Sets a configuration value in the environment's config.json file.

Values are automatically parsed as JSON types when possible. Booleans (true/false),
numbers (42, 3.14), arrays ([...]), and objects ({...}) are stored with their native
JSON types. Plain text values are stored as strings. To force a JSON-typed value to be
stored as a string, wrap it in JSON quotes (e.g. '"true"' or '"8080"').

azd env config set <path> <value> [flags]

Examples

azd env config set myapp.endpoint https://example.com
azd env config set myapp.debug true
azd env config set myapp.count 42
azd env config set infra.parameters.tags '{"env":"dev"}'
azd env config set myapp.port '"8080"'

Options

      --docs                 Opens the documentation for azd env config set in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config unset

Unsets a configuration value in the environment.

Synopsis

Removes a configuration value from the environment's config.json file.

azd env config unset <path> [flags]

Examples

azd env config unset myapp.endpoint

Options

      --docs                 Opens the documentation for azd env config unset in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for unset.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env get-value

Get specific environment value.

azd env get-value <keyName> [flags]

Options

      --docs                 Opens the documentation for azd env get-value in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-value.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env get-values

Get all environment values.

azd env get-values [flags]

Options

      --docs                 Opens the documentation for azd env get-values in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-values.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env list

List environments.

azd env list [flags]

Options

      --docs   Opens the documentation for azd env list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env new

Create a new environment and set it as the default.

azd env new <environment> [flags]

Options

      --docs                  Opens the documentation for azd env new in your web browser.
  -h, --help                  Gets help for new.
  -l, --location string       Azure location for the new environment
      --subscription string   ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env refresh

Refresh environment values by using information from a previous infrastructure provision.

azd env refresh <environment> [flags]

Options

      --docs                 Opens the documentation for azd env refresh in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for refresh.
      --hint string          Hint to help identify the environment to refresh
      --layer string         Provisioning layer to refresh the environment from.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env remove

Remove an environment.

azd env remove <environment> [flags]

Options

      --docs                 Opens the documentation for azd env remove in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Skips confirmation before performing removal.
  -h, --help                 Gets help for remove.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env select

Set the default environment.

azd env select [<environment>] [flags]

Options

      --docs   Opens the documentation for azd env select in your web browser.
  -h, --help   Gets help for select.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env set

Set one or more environment values.

Synopsis

Set one or more environment values using key-value pairs or by loading from a .env formatted file.

azd env set [<key> <value>] | [<key>=<value> ...] | [--file <filepath>] [flags]

Options

      --docs                 Opens the documentation for azd env set in your web browser.
  -e, --environment string   The name of the environment to use.
      --file string          Path to .env formatted file to load environment values from.
  -h, --help                 Gets help for set.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env set-secret

Set a name as a reference to a Key Vault secret in the environment.

Synopsis

You can either create a new Key Vault secret or select an existing one.
The provided name is the key for the .env file which holds the secret reference to the Key Vault secret.

azd env set-secret <name> [flags]

Options

      --docs                 Opens the documentation for azd env set-secret in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set-secret.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd extension

Manage azd extensions.

Options

      --docs   Opens the documentation for azd extension in your web browser.
  -h, --help   Gets help for extension.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension install

Installs specified extensions.

azd extension install <extension-id> [flags]

Options

      --docs             Opens the documentation for azd extension install in your web browser.
  -f, --force            Force installation, including downgrades and reinstalls
  -h, --help             Gets help for install.
  -s, --source string    The extension source to use for installs
  -v, --version string   The version of the extension to install

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension list

List available extensions.

azd extension list [--installed] [flags]

Options

      --docs            Opens the documentation for azd extension list in your web browser.
  -h, --help            Gets help for list.
      --installed       List installed extensions
      --source string   Filter extensions by source
      --tags strings    Filter extensions by tags

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension show

Show details for a specific extension.

azd extension show <extension-id> [flags]

Options

      --docs            Opens the documentation for azd extension show in your web browser.
  -h, --help            Gets help for show.
  -s, --source string   The extension source to use.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source

View and manage extension sources

Options

      --docs   Opens the documentation for azd extension source in your web browser.
  -h, --help   Gets help for source.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source add

Add an extension source with the specified name

azd extension source add [flags]

Options

      --docs              Opens the documentation for azd extension source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   The location of the extension source
  -n, --name string       The name of the extension source
  -t, --type string       The type of the extension source. Supported types are 'file' and 'url'

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source list

List extension sources

azd extension source list [flags]

Options

      --docs   Opens the documentation for azd extension source list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source remove

Remove an extension source with the specified name

azd extension source remove <name> [flags]

Options

      --docs   Opens the documentation for azd extension source remove in your web browser.
  -h, --help   Gets help for remove.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source validate

Validate an extension source's registry.json file.

Synopsis

Validate an extension source's registry.json file.

Accepts a source name (from 'azd extension source list'), a local file path,
or a URL. Checks required fields, valid capabilities, semver version format,
platform artifact structure, and extension ID format.

azd extension source validate <name-or-path-or-url> [flags]

Options

      --docs     Opens the documentation for azd extension source validate in your web browser.
  -h, --help     Gets help for validate.
      --strict   Enable strict validation (require checksums)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension uninstall

Uninstall specified extensions.

azd extension uninstall [extension-id] [flags]

Options

      --all    Uninstall all installed extensions
      --docs   Opens the documentation for azd extension uninstall in your web browser.
  -h, --help   Gets help for uninstall.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension upgrade

Upgrade installed extensions to the latest version.

Synopsis

Upgrade one or more installed extensions.

By default, uses the stored registry source for each extension. If the stored
source is unavailable, falls back to the main (azd) registry. Extensions that
were installed from a non-main registry (e.g., dev) are automatically promoted
to the main registry when a newer version is available there.

Use --source to explicitly override the registry source for the upgrade. Use
--all to upgrade all installed extensions in a single batch; failures in one
extension do not prevent the remaining extensions from being upgraded.

Use --output json for a structured report of all upgrade results.

azd extension upgrade [extension-id] [flags]

Options

      --all              Upgrade all installed extensions
      --docs             Opens the documentation for azd extension upgrade in your web browser.
  -h, --help             Gets help for upgrade.
  -s, --source string    The extension source to use for upgrades
  -v, --version string   The version of the extension to upgrade to

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd hooks

Develop, test and run hooks for a project.

Options

      --docs   Opens the documentation for azd hooks in your web browser.
  -h, --help   Gets help for hooks.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd hooks run

Runs the specified hook for the project, provisioning layers, and services

azd hooks run <name> [flags]

Options

      --docs                 Opens the documentation for azd hooks run in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for run.
      --layer string         Only runs hooks for the specified provisioning layer.
      --platform string      Forces hooks to run for the specified platform.
      --service string       Only runs hooks for the specified service.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd infra

Manage your Infrastructure as Code (IaC).

Options

      --docs   Opens the documentation for azd infra in your web browser.
  -h, --help   Gets help for infra.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd infra generate

Write IaC for your project to disk, allowing you to manually manage it.

azd infra generate [flags]

Options

      --docs                 Opens the documentation for azd infra generate in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Overwrite any existing files without prompting
  -h, --help                 Gets help for generate.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd init

Initialize a new application.

Synopsis

Initialize a new application.

When used with --template, a new directory is created (named after the template)
and the project is initialized inside it — similar to git clone.
Pass "." as the directory to initialize in the current directory instead.

azd init [flags]

Options

  -b, --branch string         The template branch to initialize from. Must be used with a template argument (--template or -t).
      --docs                  Opens the documentation for azd init in your web browser.
  -e, --environment string    The name of the environment to use.
  -f, --filter strings        The tag(s) used to filter template results. Supports comma-separated values.
      --from-code             Initializes a new application from your existing code.
  -h, --help                  Gets help for init.
  -l, --location string       Azure location for the new environment
  -m, --minimal               Initializes a minimal project.
  -s, --subscription string   ID of an Azure subscription to use for the new environment
  -t, --template string       Initializes a new application from a template. You can use a Full URI, <owner>/<repository>, <repository> if it's part of the azure-samples organization, or a local directory path (./dir, ../dir, or absolute path).
      --up                    Provision and deploy to Azure after initializing the project from a template.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd mcp

Manage Model Context Protocol (MCP) server. (Alpha)

Options

      --docs   Opens the documentation for azd mcp in your web browser.
  -h, --help   Gets help for mcp.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd mcp start

Starts the MCP server.

Synopsis

Starts the Model Context Protocol (MCP) server.

This command starts an MCP server that can be used by MCP clients to access
azd functionality through the Model Context Protocol interface.

azd mcp start [flags]

Options

      --docs   Opens the documentation for azd mcp start in your web browser.
  -h, --help   Gets help for start.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd monitor

Monitor a deployed project.

azd monitor [flags]

Options

      --docs                 Opens the documentation for azd monitor in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for monitor.
      --live                 Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps.
      --logs                 Open a browser to Application Insights Logs.
      --overview             Open a browser to Application Insights Overview Dashboard.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd package

Packages the project's code to be deployed to Azure.

azd package <service> [flags]

Options

      --all                  Packages all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd package in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for package.
      --output-path string   File or folder path where the generated packages will be saved.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd pipeline

Manage and configure your deployment pipelines.

Options

      --docs   Opens the documentation for azd pipeline in your web browser.
  -h, --help   Gets help for pipeline.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd pipeline config

Configure your deployment pipeline to connect securely to Azure. (Beta)

azd pipeline config [flags]

Options

  -m, --applicationServiceManagementReference string   Service Management Reference. References application or service contact information from a Service or Asset Management database. This value must be a Universally Unique Identifier (UUID). You can set this value globally by running azd config set pipeline.config.applicationServiceManagementReference <UUID>.
      --auth-type string                               The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider). Valid values: federated, client-credentials.
      --docs                                           Opens the documentation for azd pipeline config in your web browser.
  -e, --environment string                             The name of the environment to use.
  -h, --help                                           Gets help for config.
      --principal-id string                            The client id of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-name string                          The name of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-role stringArray                     The roles to assign to the service principal. By default the service principal will be granted the Contributor and User Access Administrator roles. (default [Contributor,User Access Administrator])
      --provider string                                The pipeline provider to use (github for Github Actions and azdo for Azure Pipelines).
      --remote-name string                             The name of the git remote to configure the pipeline to run on. (default "origin")

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd provision

Provision Azure resources for your project.

azd provision [<layer>] [flags]

Options

      --docs                  Opens the documentation for azd provision in your web browser.
  -e, --environment string    The name of the environment to use.
  -h, --help                  Gets help for provision.
  -l, --location string       Azure location for the new environment
      --no-state              (Bicep only) Forces a fresh deployment based on current Bicep template files, ignoring any stored deployment state.
      --preview               Preview changes to Azure resources.
      --subscription string   ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd publish

Publish a service to a container registry.

azd publish <service> [flags]

Options

      --all                   Publishes all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd publish in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-package string   Publishes the service from a container image (image tag).
  -h, --help                  Gets help for publish.
      --to string             The target container image in the form '[registry/]repository[:tag]' to publish to.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd restore

Restores the project's dependencies.

azd restore <service> [flags]

Options

      --all                  Restores all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd restore in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for restore.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd show

Display information about your project and its resources.

azd show [resource-name|resource-id] [flags]

Options

      --docs                 Opens the documentation for azd show in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for show.
      --show-secrets         Unmask secrets in output.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template

Find and view template details.

Options

      --docs   Opens the documentation for azd template in your web browser.
  -h, --help   Gets help for template.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template list

Show list of sample azd templates. (Beta)

azd template list [flags]

Options

      --docs             Opens the documentation for azd template list in your web browser.
  -f, --filter strings   The tag(s) used to filter template results. Supports comma-separated values.
  -h, --help             Gets help for list.
  -s, --source string    Filters templates by source.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template show

Show details for a given template. (Beta)

azd template show <template> [flags]

Options

      --docs   Opens the documentation for azd template show in your web browser.
  -h, --help   Gets help for show.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source

View and manage template sources. (Beta)

Options

      --docs   Opens the documentation for azd template source in your web browser.
  -h, --help   Gets help for source.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source add

Adds an azd template source with the specified key. (Beta)

Synopsis

The key can be any value that uniquely identifies the template source, with well-known values being:
・default: Default templates
・awesome-azd: Templates from https://aka.ms/awesome-azd

azd template source add <key> [flags]

Options

      --docs              Opens the documentation for azd template source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   Location of the template source. Required when using type flag.
  -n, --name string       Display name of the template source.
  -t, --type string       Kind of the template source. Supported types are 'file', 'url' and 'gh'.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source list

Lists the configured azd template sources. (Beta)

azd template source list [flags]

Options

      --docs   Opens the documentation for azd template source list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source remove

Removes the specified azd template source (Beta)

azd template source remove <key> [flags]

Options

      --docs   Opens the documentation for azd template source remove in your web browser.
  -h, --help   Gets help for remove.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd up

Provision and deploy your project to Azure with a single command.

azd up [flags]

Options

      --docs                  Opens the documentation for azd up in your web browser.
  -e, --environment string    The name of the environment to use.
  -h, --help                  Gets help for up.
  -l, --location string       Azure location for the new environment
      --subscription string   ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd update

Updates azd to the latest version.

azd update [flags]

Options

      --channel string             Update channel: stable or daily.
      --check-interval-hours int   Override the update check interval in hours.
      --docs                       Opens the documentation for azd update in your web browser.
  -h, --help                       Gets help for update.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd version

Print the version number of Azure Developer CLI.

azd version [flags]

Options

      --docs   Opens the documentation for azd version in your web browser.
  -h, --help   Gets help for version.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-sxs-human-evals/comparison-pr Mirrored review PR created by pr-sxs-human-evals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants