Skip to content

feat(config): add config command to show resolved per-service configuration#512

Open
jongio wants to merge 1 commit into
mainfrom
idea/config
Open

feat(config): add config command to show resolved per-service configuration#512
jongio wants to merge 1 commit into
mainfrom
idea/config

Conversation

@jongio

@jongio jongio commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Adds azd app config, a read-only command that prints the configuration azd app resolves from azure.yaml for each service. It gives you one place to confirm what the tool sees before you start anything.

For every service it shows the host, the effective service type (marked explicit when set in azure.yaml or inferred when derived from the service shape), language, project path, run command, image, ports, and dependencies (uses). It also lists which optional blocks are configured on the service: docker, healthcheck, restart, resources, logs, local, and azure.

Run it with no arguments to print every service, or pass a service name to print just that one. --output json emits an object keyed by service name.

Example

azd app config
azd app config api
azd app config --output json

Details

  • Effective type uses the existing Service.GetServiceType() resolver, so the output matches how the rest of the tool interprets the service.
  • An unknown service name returns an error that lists the available services, matching the behavior of env.
  • The resolve-and-select logic sits in selectServiceConfigs, kept separate from I/O so it is covered by unit tests without touching the working directory.
  • Service-level hooks are not part of the azure.yaml schema, so they are not reported here. Lifecycle hooks are project level.

Testing

  • go build ./...
  • go vet ./src/cmd/app/commands/...
  • go test ./src/cmd/app/commands/ -run "TestBuildServiceConfig|TestConfiguredBlocks|TestSelectServiceConfigs|TestServiceConfigJSONShape" -count=1
  • golangci-lint run ./src/cmd/app/commands/...

Closes #507

…ration

Add `azd app config` to print the configuration azd app resolves from
azure.yaml for each service: host, effective type (explicit or inferred),
language, project, command, image, ports, uses, and which optional blocks
are configured. Supports an optional service-name argument and --output json.

Closes #507

Co-authored-by: Copilot App <[email protected]>
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 13, 2026
@jongio jongio self-assigned this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add azd app config command to show effective per-service configuration

1 participant