Skip to content

Commit

Permalink
Corrected 'allowedValues' for Linux offer in UIDefinitionFile (Azure#…
Browse files Browse the repository at this point in the history
…1076)

* Corrected 'allowedValues' for Linux offer in UIDefinitionFile

* GitHub Action: Build Bicep to JSON

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
tsweatman1 and github-actions authored Aug 9, 2024
1 parent abcda68 commit c35513e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bicep/form/mlz.portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@
"multiLine": true,
"constraints": {
"required": true,
"allowedValues": "[if(equals(steps('remoteAccess').linuxVmSection.linuxVmImagePublisher, 'Canonical'), parse('[{\"label\": \"Ubuntu\",\"value\": \"ubuntu\"}]'), if(equals(steps('remoteAccess').linuxVmSection.linuxVmImagePublisher, 'RedHat'), parse('[{\"label\": \"RHEL\",\"value\": \"RHEL\"}]'), parse('[{\"label\": \"Debian\",\"value\": \"debian-12\"}]')))]"
"allowedValues": "[if(equals(steps('remoteAccess').linuxVmSection.linuxVmImagePublisher, 'Canonical'), parse('[{\"label\": \"Archaic\",\"value\": \"ubuntuserver\"},{\"label\": \"Version 20\",\"value\": \"0001-com-ubuntu-server-focal\"},{\"label\": \"Version 22\",\"value\": \"0001-com-ubuntu-server-jammy\"}]'), if(equals(steps('remoteAccess').linuxVmSection.linuxVmImagePublisher, 'RedHat'), parse('[{\"label\": \"RHEL\",\"value\": \"RHEL\"}]'), parse('[{\"label\": \"Debian\",\"value\": \"debian-12\"}]')))]"
},
"visible": "[steps('remoteAccess').linuxVmSection.deployLinuxVirtualMachine]"
},
Expand Down
8 changes: 5 additions & 3 deletions src/bicep/mlz.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,15 @@ param linuxVmOsDiskType string = 'Standard_LRS'
@description('[Canonical for Ubuntu/RedHat/Debian] The available Linux Publishers')
param linuxVmImagePublisher string = 'Canonical'
@allowed([
'Ubuntu'
'ubuntuserver'
'0001-com-ubuntu-server-focal'
'0001-com-ubuntu-server-jammy'
'RHEL'
'Debian-12'
])
@description('[Ubuntu/RHEL/Debian-12] The available Linux Offers')
param linuxVmImageOffer string = 'Ubuntu'
param linuxVmImageSku string = '18_04-lts-gen2'
param linuxVmImageOffer string = '0001-com-ubuntu-server-focal'
param linuxVmImageSku string = '20_04-lts-gen2'
param linuxVmSize string = 'Standard_D2s_v3'

@allowed([
Expand Down
10 changes: 6 additions & 4 deletions src/bicep/mlz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "10326969842852970072"
"templateHash": "14639382000576629473"
}
},
"parameters": {
Expand Down Expand Up @@ -659,9 +659,11 @@
},
"linuxVmImageOffer": {
"type": "string",
"defaultValue": "Ubuntu",
"defaultValue": "0001-com-ubuntu-server-focal",
"allowedValues": [
"Ubuntu",
"ubuntuserver",
"0001-com-ubuntu-server-focal",
"0001-com-ubuntu-server-jammy",
"RHEL",
"Debian-12"
],
Expand All @@ -671,7 +673,7 @@
},
"linuxVmImageSku": {
"type": "string",
"defaultValue": "18_04-lts-gen2"
"defaultValue": "20_04-lts-gen2"
},
"linuxVmSize": {
"type": "string",
Expand Down

0 comments on commit c35513e

Please sign in to comment.