Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useBicepForContainerApps doesn't work (has no effect) #4423

Closed
1 task done
dab-abittner opened this issue Oct 10, 2024 · 1 comment
Closed
1 task done

useBicepForContainerApps doesn't work (has no effect) #4423

dab-abittner opened this issue Oct 10, 2024 · 1 comment
Labels
customer-reported identify a customer issue question

Comments

@dab-abittner
Copy link

dab-abittner commented Oct 10, 2024

Output from azd version
azd version 1.10.2 (commit 84ea220)

Describe the bug
Even though I've enabled the new alpha feature alpha.aspire.useBicepForContainerApps (see this PR) there are still YAML files generated instead of Bicep files. The feature is also missing from azd config list-alpha.
Am I missing something & this feature depends on Aspire 9?

PS C:\Users\abittner\Git\ScalingTest> dotnet --version
8.0.402
PS C:\Users\abittner\Git\ScalingTest> dotnet workload list

Installed Workload Id      Manifest Version      Installation Source
--------------------------------------------------------------------
aspire                     8.2.1/8.0.100         SDK 8.0.400

Use `dotnet workload search` to find additional workloads to install.

PS C:\Users\abittner\Git\ScalingTest> azd version
azd version 1.10.2 (commit 84ea22048b9a1c167bc4ae2095cc7f91798ef11e)
PS C:\Users\abittner\Git\ScalingTest> azd config list-alpha
Name: aca.persistDomains
Description: Do not change custom domains when deploying Azure Container Apps.
Status: On

Name: aca.persistIngressSessionAffinity
Description: Do not change Ingress Session Affinity when deploying Azure Container Apps.
Status: Off

Name: aks.helm
Description: Enable Helm support for AKS deployments.
Status: Off

Name: aks.kustomize
Description: Enable Kustomize support for AKS deployments.
Status: Off

Name: azd.operations
Description: Extends provisioning providers with azd operations.
Status: Off

Name: deployment.stacks
Description: Enables Azure deployment stacks for ARM/Bicep based deployments.
Status: Off

Name: infraSynth
Description: Enable the `infra synth` command to write generated infrastructure to disk.
Status: On
PS C:\Users\abittner\Git\ScalingTest> azd config show
{
  "alpha": {
    "aca": {
      "persistDomains": "on"
    },
    "aspire": {
      "useBicepForContainerApps": "on"
    },
    "infraSynth": "on"
  },
  "defaults": {
    "location": "germanywestcentral",
    "subscription": "XXXXXX"
  }
}
PS C:\Users\abittner\Git\ScalingTest> azd infra synth

WARNING: Feature 'infraSynth' is in alpha stage.
To learn more about alpha features and their support, visit https://aka.ms/azd-feature-stages.

PS C:\Users\abittner\Git\ScalingTest> ls .\ScalingTest.AppHost\infra\

    Directory: C:\Users\abittner\Git\ScalingTest\ScalingTest.AppHost\infra

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          10.10.2024    17:09           1628 api.tmpl.yaml
-a---          10.10.2024    17:09           1637 worker.tmpl.yaml

PS C:\Users\abittner\Git\ScalingTest>

To Reproduce
Enable the config option alpha.aspire.useBicepForContainerApps & run azd infra synth -> there are still .tmpl.yaml files generated instead of .bicep.

Expected behavior
.bicep files are generated instead of .tmpl.yaml files.

@vhvb1989
Copy link
Member

The alpha feature is not required. It was added at some point for daily builds and we missed removing it from the Changelog.

Azd automatically switches betweeen YAML and BICEP when the AppHost program uses PublishAsAzureContainerApp(). See: https://github.com/dotnet/aspire/blob/main/playground/AzureContainerApps/AzureContainerApps.AppHost/Program.cs#L30C9-L30C35

PublishAsAzureContainerApp() is part of Aspire 9, so yes, you do need Aspire 9 for this. You can use the latest preview to try it out.

Sorry about the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported identify a customer issue question
Projects
None yet
Development

No branches or pull requests

2 participants