[BUG] Bicep Azure Spring Cloud Bicep error: Java 17 not supported for type Jar
Describe the bug When attempting to execute an Azure Spring Cloud Bicep template, the following error message is generated and information about the deployment is not written to the console:
{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"DeploymentFailed\",\r\n \"message\": \"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.\",\r\n \"details\": [\r\n {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"{\\r\\n \\\"error\\\": {\\r\\n \\\"code\\\": \\\"BadArgument\\\",\\r\\n \\\"message\\\": \\\"Invalid arguments: properties.source.runtimeVersion with value Java_17 is not supported for type Jar\\\",\\r\\n \\\"target\\\": null,\\r\\n \\\"details\\\": [\\r\\n {\\r\\n \\\"code\\\": \\\"BadArgument\\\",\\r\\n \\\"message\\\": \\\"properties.source.runtimeVersion with value Java_17 is not supported for type Jar\\\",\\r\\n \\\"target\\\": \\\"properties.source.runtimeVersion\\\",\\r\\n \\\"details\\\": null\\r\\n }\\r\\n ]\\r\\n }\\r\\n}\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}"}]}}
Also seeing the message in the output immediately after the command is issued:
C:\Code\myproj\bicep\modules\spring-cloud\spring-cloud.bicep(65,23) : Warning BCP036: The property "runtimeVersion" expected a value of type "'Java_11' | 'Java_8' | 'NetCore_31' | null" but the provided value is of type "'Java_17 '". If this is an inaccuracy in the documentation, please report it to the Bicep Team. [https://aka.ms/bicep-type-issues] C:\Code\myproj\bicep\modules\application-insights\app-insights.bicep(29,21) : Warning BCP036: The property "Application_Type" expected a value of type "'other' | 'web'" but the provided value is of type "'java'". If this is an inaccuracy in the documentation, please report it to the Bicep Team. [https://aka.ms/bicep-type-issues]
I'm not sure if this is an issue with NubesGen, Bicep, or Azure Spring Cloud. I've previously created an Azure Spring Cloud instance with Java 17 by hand, but this is my first time to create it with Bicep.
An Azure Spring Cloud instance is created along with an application, but the application is in an invalid state.
To Reproduce Steps to reproduce the behavior: On nubesgen.com:
- Specify Bicep template
- Select Application Type: Spring Boot Application
- Select App size: Basic
- Select Database: Azure SQL Database / Serverless
- Check Application Insights
- Download the Bicep templates
- run the command
az deployment sub create --name 'demo{environment}' --location eastus --template-file main.bicep
Expected behavior Information about the deployment should be generated
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows
- Browser: Chrome
- Version: 'nubesgen-version': '0.11.4'
Additional context if Java_17 is changed to Java_11 in spring-cloud.bicep the deployment information is successfully generated
Noticed my local Bicep installation needs to be upgraded. Will upgrade and follow up.
Issue still happens after upgrading bicep locally.
Hi @jimbethancourt, Thanks for reporting that issue. I'll have a look at it.