Skip to content

Commit

Permalink
error for alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
weikanglim committed Oct 28, 2024
1 parent 5daed72 commit d3565c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion cli/azd/pkg/project/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,17 @@ func (im *ImportManager) ProjectInfrastructure(ctx context.Context, projectConfi
}
}

if im.dotNetImporter.alphaFeatureManager.IsEnabled(alpha.FeatureId(alpha.Compose)) && len(projectConfig.Resources) > 0 {
composeEnabled := im.dotNetImporter.alphaFeatureManager.IsEnabled(alpha.FeatureId(alpha.Compose))
if composeEnabled && len(projectConfig.Resources) > 0 {
return tempInfra(ctx, projectConfig)
}

if !composeEnabled && len(projectConfig.Resources) > 0 {
return nil, fmt.Errorf(
"compose is currently under alpha support and must be explicitly enabled."+
" Run `%s` to enable this feature", alpha.GetEnableCommand(alpha.Compose))
}

return &Infra{}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion cli/azd/resources/alpha_features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
- id: deployment.stacks
description: "Enables Azure deployment stacks for ARM/Bicep based deployments."
- id: compose
description: "Enables azd composability. Run `azd add` to add new resources to your project."
description: "Enable simplified app-centric modeling. Run `azd add` to add Azure components to your project."

0 comments on commit d3565c7

Please sign in to comment.