Skip to content

metadata.display.yaml: Variable rendering order ignores YAML key order, sorts by required/default status #3400

@ashley-w-brazier-cloudm

Description

@ashley-w-brazier-cloudm

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

  1. 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
  1. In metadata.yaml, vm_admin_username has defaultValue: cloudm, while windows_admin_password has required: true (no default).

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions