Description
The Google Cloud Marketplace deployment form does not respect the YAML key order of variables within metadata.display.yaml. Instead, it appears to sort fields by whether they are required (no default) vs optional (have a default value). Required fields render before optional fields within each section.
This makes it impossible to control the logical grouping and order of fields in the deployment form.
Steps to Reproduce
- Define variables in
metadata.display.yaml with a specific key order:
variables:
vm_admin_username:
name: vm_admin_username
title: Windows Admin Username
section: credentials
windows_admin_password:
name: windows_admin_password
title: Windows Admin Password
section: credentials
-
In metadata.yaml, vm_admin_username has defaultValue: cloudm, while windows_admin_password has required: true (no default).
-
Load the Marketplace deployment form.
Expected Behavior
Fields render in YAML key order: Username first, then Password.
Actual Behavior
Fields render with required/no-default fields first: Password first, then Username.
Observed pattern across all sections:
- Fields with no
defaultValue (required) render first
- Fields with
defaultValue render after
Impact
- Cannot place a username field before its corresponding password field
- Cannot logically group related fields (e.g., username + password pairs)
- Workaround of separating into more sections is limited -- the same sorting applies within each section
Environment
- Google Cloud Marketplace Producer Portal
- Terraform VM deployment type
- Blueprint metadata schema from cloud-foundation-toolkit
Related
This may be related to #3399 (boolean toggle default evaluation). Both issues suggest the marketplace UI renderer handles default values differently from what the schema implies.
Description
The Google Cloud Marketplace deployment form does not respect the YAML key order of variables within
metadata.display.yaml. Instead, it appears to sort fields by whether they are required (no default) vs optional (have a default value). Required fields render before optional fields within each section.This makes it impossible to control the logical grouping and order of fields in the deployment form.
Steps to Reproduce
metadata.display.yamlwith a specific key order:In
metadata.yaml,vm_admin_usernamehasdefaultValue: cloudm, whilewindows_admin_passwordhasrequired: true(no default).Load the Marketplace deployment form.
Expected Behavior
Fields render in YAML key order: Username first, then Password.
Actual Behavior
Fields render with required/no-default fields first: Password first, then Username.
Observed pattern across all sections:
defaultValue(required) render firstdefaultValuerender afterImpact
Environment
Related
This may be related to #3399 (boolean toggle default evaluation). Both issues suggest the marketplace UI renderer handles default values differently from what the schema implies.