@@ -55,7 +55,7 @@ func newDownFlags(cmd *cobra.Command, global *internal.GlobalCommandOptions) *do
5555
5656func newDownCmd () * cobra.Command {
5757 cmd := & cobra.Command {
58- Use : "down" ,
58+ Use : "down [<layer>] " ,
5959 Short : "Delete your project's Azure resources." ,
6060 }
6161 cmd .Args = cobra .MaximumNArgs (1 )
@@ -114,15 +114,6 @@ func (a *downAction) Run(ctx context.Context) (*actions.ActionResult, error) {
114114 a .console .WarnForFeature (ctx , azapi .FeatureDeploymentStacks )
115115 }
116116
117- if len (infra .Options .Layers ) > 1 {
118- if ! a .alphaFeatureManager .IsEnabled (featLayers ) {
119- return nil , fmt .Errorf (
120- "Layered provisioning is not enabled. Run '%s' to enable it." , alpha .GetEnableCommand (featLayers ))
121- }
122-
123- a .console .WarnForFeature (ctx , featLayers )
124- }
125-
126117 downLayer := ""
127118 if len (a .args ) > 0 {
128119 downLayer = a .args [0 ]
@@ -168,7 +159,10 @@ func (a *downAction) Run(ctx context.Context) (*actions.ActionResult, error) {
168159func getCmdDownHelpDescription (* cobra.Command ) string {
169160 return generateCmdHelpDescription (fmt .Sprintf (
170161 "Delete Azure resources for an application. Running %s will not delete application" +
171- " files on your local machine." , output .WithHighLightFormat ("azd down" )), nil )
162+ " files on your local machine." , output .WithHighLightFormat ("azd down" )), []string {
163+ "When <layer> is specified, only deletes resources for the given layer." +
164+ " When omitted, deletes resources for all layers defined in the project." ,
165+ })
172166}
173167
174168func getCmdDownHelpFooter (* cobra.Command ) string {
0 commit comments