Repository navigation
Closed
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packages
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I tried to upgrade the excellent Keycloak Blueprint created by Julio Casal (@julioct) from Aspire 9.4.1 to 9.5.1.
For Keycloak, I changed the version to
<PackageReference Include="Aspire.Hosting.Keycloak" Version="9.5.1-preview.1.25502.11" />
Any idea about what's wrong with 9.5.1?
Thanks in advance!
PS: Here is the output after azd up or azd provision
ERROR: error executing step command 'provision': initializing provisioning manager: failed to compile bicep template: failed running bicep build: exit code: 1, stdout: , stderr: C:\Users\rudyco\AppData\Local\Temp\azd-infra3768110317\cae\cae.module.bicep(4,7) : Warning no-unused-params: Parameter "userPrincipalId" is declared but never used. [https://aka.ms/bicep/linter-diagnostics#no-unused-params]
C:\Users\rudyco\AppData\Local\Temp\azd-infra3768110317\postgres\postgres.module.bicep(92,8) : Error BCP353: The outputs "hostName", "hostname" differ only in casing. The ARM deployments engine is not case sensitive and will not be able to distinguish between them. [https://aka.ms/bicep/core-diagnostics#BCP353]
C:\Users\rudyco\AppData\Local\Temp\azd-infra3768110317\postgres\postgres.module.bicep(94,8) : Error BCP353: The outputs "hostName", "hostname" differ only in casing. The ARM deployments engine is not case sensitive and will not be able to distinguish between them. [https://aka.ms/bicep/core-diagnostics#BCP353]
C:\Users\rudyco\AppData\Local\Temp\azd-infra3768110317\templateapp-api-roles-postgres-kv\templateapp-api-roles-postgres-kv.module.bicep(2,7) : Warning no-unused-params: Parameter "location" is declared but never used. [https://aka.ms/bicep/linter-diagnostics#no-unused-params]
C:\Users\rudyco\AppData\Local\Temp\azd-infra3768110317\main.bicep(16,7) : Warning no-unused-params: Parameter "KeycloakPassword" is declared but never used. [https://aka.ms/bicep/linter-diagnostics#no-unused-params]
C:\Users\rudyco\AppData\Local\Temp\azd-infra3768110317\main.bicep(39,17) : Error BCP104: The referenced module has errors. [https://aka.ms/bicep/core-diagnostics#BCP104]
Expected Behavior
No issue to deploy to Azure.
Steps To Reproduce
Download the Blueprint (link above).
Upgrade all the Aspire packages to 9.5.1 (preview for Keycloak)
Exceptions (if any)
See output logs.
.NET Version info
9.x
Anything else?
Maybe related to these PRs
Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packages
Activity
MihuBot commentedon Oct 11, 2025
I'm a bot. Here are possible related and/or duplicate issues (I may be wrong):
RudyCo commentedon Oct 11, 2025
You're a good bot but these 2 links don't help much, as we used to say in French : "Rien à voir avec la choucroute !" 😆
davidfowl commentedon Oct 12, 2025
Can you share the code in the apphost?
RudyCo commentedon Oct 12, 2025
Here it is...
RudyCo commentedon Oct 12, 2025
The
azd infra generatecommands creates the same output twice in thepostgres.module.bicepfile:Commenting this code, fixes the issue:
RudyCo commentedon Oct 12, 2025
It's possibly more a breaking change rather than a regression.
Maybe
infra.Add(new ProvisioningOutput("hostname", typeof(string))should raise an exception in case the output key is already provided by Aspire.davidfowl commentedon Oct 12, 2025
Yes, we made improvements here that make it so you don't need to add the output.
FYI Julio Casal (@julioct)
julioct commentedon Oct 14, 2025
Thank you for reporting this, RudyCo (@RudyCo). I just confirmed this is enough to create the PosgreSQL resource now:
But you also need to update how you build the connection string for the Keycloak DB, using the new
HostNameproperty on the PostgreSQL resource:The template download at https://juliocasal.com/blueprint is now updated to 9.5 too.
davidfowl commentedon Oct 14, 2025
Julio Casal (@julioct) it will improve more in the next version #11938
RudyCo commentedon Oct 14, 2025
Thanks Julio Casal (@julioct) for the confirmation.
I am using SQL Server, so I updated the connection string as follows:
[keycloakSql.Resource.FullyQualifiedDomainName](jdbc:sqlserver://{keycloakSql.Resource.FullyQualifiedDomainName})...julioct commentedon Oct 14, 2025
Beautiful!