From 0a424f100783a49bb77d50e2bd5043f99e9eda1f Mon Sep 17 00:00:00 2001 From: Mike Azure <127820851+AzureMike@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:07:11 -0700 Subject: [PATCH] Declare property defaults so unset optional properties have a value Several resource types documented a default in prose without declaring it, and the ones that did declare a default had no effect because Radius never materialized them. Declare the missing keys so they take effect alongside radius-project/radius schema defaulting. Added: size on redisCaches and postgreSqlDatabases, version and database on mySqlDatabases, and database on postgreSqlDatabases. neo4jDatabases is left alone because its documented default is the resource name, which a static default cannot express. The mySqlDatabases version default is 8.4, which is what the AWS Terraform and Kubernetes Bicep recipes already fall back to when version is unset. The Azure pack maps everything except 5.7 to 8.0.21, so it deploys the same image either way and only AWS and Kubernetes would notice a different value. Declaring 8.0 here would have silently downgraded them, and a running RDS instance rejects a major version downgrade outright. Related to radius-project/radius#12532 Signed-off-by: Mike Azure <127820851+AzureMike@users.noreply.github.com> --- Data/mySqlDatabases/mySqlDatabases.yaml | 4 +++- Data/postgreSqlDatabases/postgreSqlDatabases.yaml | 2 ++ Data/redisCaches/redisCaches.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Data/mySqlDatabases/mySqlDatabases.yaml b/Data/mySqlDatabases/mySqlDatabases.yaml index 56a0361e..7abe3bd2 100644 --- a/Data/mySqlDatabases/mySqlDatabases.yaml +++ b/Data/mySqlDatabases/mySqlDatabases.yaml @@ -72,11 +72,13 @@ types: description: "(Required) The administrator password for the MySQL database. Marked `x-radius-sensitive`: Radius encrypts it at rest, redacts it on reads, and exposes it decrypted only to the recipe as `{{context.resource.properties.password}}`." database: type: string + default: mysql_db description: "(Optional) The name of the database. Defaults to `mysql_db` if not provided." version: type: string enum: ['5.7', '8.0', '8.4'] - description: "(Optional) The major MySQL server version in the X.Y format. Assumed to be 8.4 if not specified." + default: '8.4' + description: "(Optional) The major MySQL server version in the X.Y format. Defaults to `8.4` if not provided." host: type: string description: The host name used to connect to the database. Mapped from the recipe module's output. diff --git a/Data/postgreSqlDatabases/postgreSqlDatabases.yaml b/Data/postgreSqlDatabases/postgreSqlDatabases.yaml index 36203211..9d1f60fe 100644 --- a/Data/postgreSqlDatabases/postgreSqlDatabases.yaml +++ b/Data/postgreSqlDatabases/postgreSqlDatabases.yaml @@ -66,6 +66,7 @@ types: size: type: string enum: ['S', 'M', 'L'] + default: 'S' description: "(Optional) The size of the PostgreSQL database. Defaults to `S` if not provided." username: type: string @@ -76,6 +77,7 @@ types: description: "(Required) The administrator password for the PostgreSQL database. Marked `x-radius-sensitive`: Radius encrypts it at rest, redacts it on reads, and exposes it decrypted only to the recipe as `{{context.resource.properties.password}}`." database: type: string + default: postgres_db description: "(Optional) The name of the database. Defaults to `postgres_db` if not provided." initSql: type: string diff --git a/Data/redisCaches/redisCaches.yaml b/Data/redisCaches/redisCaches.yaml index fb7fe5fa..829006ac 100644 --- a/Data/redisCaches/redisCaches.yaml +++ b/Data/redisCaches/redisCaches.yaml @@ -67,6 +67,7 @@ types: size: type: string enum: ['S', 'M', 'L'] + default: 'S' description: "(Optional) The size of the Redis cache. Defaults to `S` if not provided. The recipe maps the size onto a concrete cloud SKU." host: type: string