Setting the file. One moment.
Skill 48 · Azure Developer CLI
Subchapter 48.3
references/project-structure.mdMarkdown5 KBView on GitHub
Use this as a default, not as a reason to reorganize an already coherent repository:
.
|-- .azure/ # Generated local AZD environment state; ignored
|-- .devcontainer/ # Optional reproducible developer environment
|-- .github/
| |-- workflows/
| |-- azure-dev.yml # Optional GitHub Actions pipeline
|-- infra/
| |-- main.bicep # Bicep orchestration entry point
| |-- main.parameters.json # AZD environment-to-Bicep parameter mapping
| |-- modules/
| |-- core/ # Shared platform resources
| |-- app/ # Application-specific resources
|-- scripts/
| |-- azd/ # Hook and deployment helper scripts
|-- src/
| |-- api/ # Independently deployable service
| |-- web/ # Independently deployable service
|-- tests/
|-- .gitignore
|-- azure.yaml
|-- README.mdFor Terraform, use a conventional infra layout:
infra/
|-- main.tf
|-- providers.tf
|-- variables.tf
|-- outputs.tf
|-- provider.conf.json # AZD remote backend configuration, when used
|-- modules/azure.yaml at the project root.infra unless a script belongs exclusively to an infrastructure layer.infra/dev, infra/test, and infra/prod. Use parameters..devcontainer only when it is maintained and tested.Add the schema directive for editor validation:
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
name: sample-app
infra:
provider: bicep
path: ./infra
module: main
services:
api:
project: ./src/api
language: ts
host: appservice
web:
project: ./src/web
dist: dist
language: ts
host: staticwebappThe explicit infra block is useful when clarity matters, even though Bicep, infra, and main are defaults.
name is lowercase, starts and ends with an alphanumeric character, and uses only alphanumerics and hyphens.metadata.template identifies the source template and version when the repository is distributed as a template.infra.provider, infra.path, and infra.module match the actual repository.requiredVersions is used when the project depends on a minimum AZD or extension version.workflows overrides defaults only when deployment ordering genuinely requires it.state.remote is configured at project scope when teams share AZD environments.project points to the service root and uses a relative path.language, host, dist, container, and remote-build settings match how the service is built.project or image, not both.resourceName is set only when standard AZD discovery through the azd-service-name tag is unavailable or intentionally bypassed.uses relationships rather than implicit assumptions.dependsOn when AZD cannot infer them.pipeline.variables contains nonsecret configuration.pipeline.secrets is used only when the pipeline must store the resolved value instead of a Key Vault reference.Document:
Do not put actual subscription IDs, tenant IDs, secret names that reveal sensitive systems, or production endpoints in reusable documentation.