Skip to content

Commit 128538f

Browse files
docs: update documentation for features from 2026-04-04
- Add 'update' command as Beta to feature-stages.md (PR Azure#7489) - Update azd-update.md design doc status to Beta, remove alpha toggle section - Add new layer-hooks.md documenting per-provisioning-layer hooks (PR Azure#7382) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5ada4d9 commit 128538f

3 files changed

Lines changed: 85 additions & 8 deletions

File tree

cli/azd/docs/design/azd-update.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Design: `azd update`, Auto-Update & Channel Management
22

33
**Epic**: [#6721](https://github.com/Azure/azure-dev/issues/6721)
4-
**Status**: Draft
4+
**Status**: Beta
55

66
---
77

@@ -13,7 +13,7 @@ Today, when a new version of `azd` is available, users see a warning message wit
1313
2. **Auto-update** — opt-in background updates applied at next startup
1414
3. **Channel management** — ability to switch between `stable` and `daily` builds
1515

16-
The feature ships as a hidden command behind an alpha feature toggle (`alpha.update`) for safe rollout. When the toggle is off, there are zero changes to existing behavior — `azd version`, update notifications, everything stays exactly as it is today.
16+
The feature previously shipped as an alpha command behind the `alpha.update` feature toggle. As of `1.24.0`, `azd update` is promoted to **Beta** and is available by default — no feature toggle required.
1717

1818
---
1919

@@ -361,14 +361,11 @@ Uses the existing azd telemetry infrastructure (OpenTelemetry). New telemetry fi
361361

362362
These codes are integrated into azd's `MapError` pipeline, so update failures show up properly in telemetry dashboards alongside other command errors.
363363

364-
### 8. Feature Toggle (Alpha Gate)
364+
### 8. Feature Stage (Beta)
365365

366-
The entire update feature ships behind `alpha.update` (default: off). This means:
366+
`azd update` is promoted to **Beta** as of `1.24.0` and is available by default without any feature flag. Users will see a one-time Beta notice on first use, and a default update channel (`stable`) is persisted to config so the notice is only shown once.
367367

368-
- **Toggle off** (default): Zero behavior changes. `azd version` output is the same. Update notification shows the existing platform-specific install instructions. `azd update` returns an error telling the user to enable the feature.
369-
- **Toggle on** (`azd config set alpha.update on`): All update features are active — `azd update` works, auto-update stages/applies, `azd version` shows the channel suffix, notifications say "run `azd update`."
370-
371-
This lets us roll out to internal users first, gather feedback, and fix issues before broader availability. Once stable, the toggle can be removed and the feature enabled by default.
368+
Previously, the feature shipped behind the `alpha.update` flag. All references to that flag have been removed.
372369

373370
### 9. Update Banner Suppression
374371

cli/azd/docs/feature-stages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ As of `1.21.1`, each Azure Developer CLI feature has been evaluated and assigned
2222
| Command | package | Beta |
2323
| Command | add | Beta |
2424
| Command | infra generate | Beta |
25+
| Command | update | Beta |
2526
| Language | Python | Stable |
2627
| Language | JavaScript/TypeScript | Stable |
2728
| Language | Java | Stable |

cli/azd/docs/layer-hooks.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Hooks for Provisioning Layers
2+
3+
The Azure Developer CLI supports running lifecycle hooks at the individual provisioning layer level when using [Layered Provisioning](../docs/feature-stages.md).
4+
5+
## Overview
6+
7+
In addition to project-level and service-level hooks, you can define `preprovision` and `postprovision` hooks directly on each entry in `infra.layers[]` inside `azure.yaml`. These layer hooks run in the context of the layer's own directory, making it easy to run layer-specific scripts without sharing infrastructure.
8+
9+
## Configuring Layer Hooks
10+
11+
Add a `hooks` block to any layer under `infra.layers` in your `azure.yaml`:
12+
13+
```yaml
14+
infra:
15+
layers:
16+
- name: shared
17+
path: infra/shared
18+
hooks:
19+
preprovision:
20+
shell: sh
21+
run: ./scripts/prepare-shared.sh
22+
postprovision:
23+
shell: sh
24+
run: ./scripts/notify-shared-done.sh
25+
26+
- name: app
27+
path: infra/app
28+
hooks:
29+
preprovision:
30+
shell: sh
31+
run: ./scripts/prepare-app.sh
32+
```
33+
34+
### Supported hook events
35+
36+
| Hook name | When it runs |
37+
| --------------- | -------------------------------------- |
38+
| `preprovision` | Before the layer's resources are deployed |
39+
| `postprovision` | After the layer's resources are deployed |
40+
41+
### Hook paths
42+
43+
All paths specified in layer hooks are resolved **relative to the layer's `path`** directory (not the project root).
44+
45+
## Running Layer Hooks Manually
46+
47+
Use `azd hooks run` with the new `--layer` flag to run hooks for a specific provisioning layer:
48+
49+
```bash
50+
# Run the 'preprovision' hook for the 'shared' layer only
51+
azd hooks run preprovision --layer shared
52+
53+
# Run the 'postprovision' hook for the 'app' layer only
54+
azd hooks run postprovision --layer app
55+
```
56+
57+
> **Note**: `--layer` and `--service` are mutually exclusive. You cannot specify both in the same command.
58+
59+
## Multi-hook format
60+
61+
Each hook event accepts either a single hook object or an array of hook objects:
62+
63+
```yaml
64+
infra:
65+
layers:
66+
- name: shared
67+
path: infra/shared
68+
hooks:
69+
preprovision:
70+
- shell: sh
71+
run: ./scripts/step1.sh
72+
- shell: sh
73+
run: ./scripts/step2.sh
74+
```
75+
76+
## Related
77+
78+
- [Layered Provisioning](../docs/feature-stages.md)
79+
- [Hooks (project and service level)](https://learn.microsoft.com/azure/developer/azure-developer-cli/azd-schema#hooks)

0 commit comments

Comments
 (0)