diff --git a/docs/content/getting-started/add-connection/_index.md b/docs/content/getting-started/add-connection/_index.md index f2e165285..342220212 100644 --- a/docs/content/getting-started/add-connection/_index.md +++ b/docs/content/getting-started/add-connection/_index.md @@ -10,11 +10,13 @@ The Radius Demo application runs on its own, but most applications depend on oth ## Add a PostgreSQL database and connections +> **Private development only:** This Kubernetes demo sets the database's `tls` policy to `disabled` and the PostgreSQL client's `PGSSLMODE` to `disable`. Password authentication remains enabled, but database traffic is unencrypted and credentials and queries can be exposed in transit. Use only a private, disposable development cluster. + The `app-postgresql.bicep` definition builds on `app.bicep` by adding a `Radius.Data/postgreSqlDatabases` resource, a `Radius.Security/secrets` resource, a `@secure()` password parameter, and two `connections` entries on the container. The highlighted lines are the additions:
-{{< rad file="/static/samples/demo/app-postgresql.bicep" embed=true markdownConfig=` {hl_lines=["6-8","36-43","47-57","59-70"]}` >}} +{{< rad file="/static/samples/demo/app-postgresql.bicep" embed=true markdownConfig=` {hl_lines=["6-8","29-33","41-48","52-63","65-76"]}` >}} The `postgresql` resource is provisioned by the PostgreSQL Recipe in the default Recipe Pack. The `password` parameter is declared with `@secure()`, which keeps its value out of deployment logs and history and lets you supply the password at deploy time instead of hardcoding it. The application passes that value directly to the database's `password` property. Because the property is `x-radius-sensitive`, Radius encrypts it and redacts it from reads. diff --git a/docs/content/getting-started/install-radius/_index.md b/docs/content/getting-started/install-radius/_index.md index dd116892f..2da770253 100644 --- a/docs/content/getting-started/install-radius/_index.md +++ b/docs/content/getting-started/install-radius/_index.md @@ -12,6 +12,8 @@ In part one, you will install Radius on an existing Kubernetes cluster. For this guide you only need a **Kubernetes cluster**. To install Radius, your user must have the cluster-admin role. Radius }}">supports AKS, EKS, k3d, and kind clusters. Running a local cluster with k3d or kind is recommended. +> **PostgreSQL TLS prerequisite:** The database step explicitly disables TLS. Use a private, disposable Kubernetes cluster; do not expose the demo or database publicly. + ## Install the Radius CLI {{< read file="/shared-content/installation/rad-cli/install-rad-cli.md" >}} diff --git a/docs/content/management/existing-recipes/_index.md b/docs/content/management/existing-recipes/_index.md index 609be9c93..78002ddff 100644 --- a/docs/content/management/existing-recipes/_index.md +++ b/docs/content/management/existing-recipes/_index.md @@ -62,27 +62,39 @@ git::https://github.com/my-org/modules.git//rds?ref=v6.1.0 {{% codetab %}} -Bicep modules are referenced by their OCI registry path, with the version in the image tag. For example, reference an Azure Verified Module from the Microsoft Container Registry: +Bicep modules are referenced by their OCI registry path, with the version in the image tag. This example uses the Azure Storage Account AVM to provision a blob container for [`Radius.Storage/objectStorage`]({{< ref "/reference/resources/radius.storage/2025-08-01-preview/objectstorage" >}}): ```bicep extension radius resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { - name: 'azure-data-recipes' + name: 'azure-storage-recipes' properties: { recipes: { - 'Radius.Data/postgreSqlDatabases': { + 'Radius.Storage/objectStorage': { kind: 'bicep' - source: 'br:mcr.microsoft.com/bicep/avm/res/db-for-postgre-sql/flexible-server:0.4.0' + source: 'br:mcr.microsoft.com/bicep/avm/res/storage/storage-account:0.32.1' parameters: { - name: 'pg-{{context.resource.name}}' + name: '{{context.resource.name}}' location: 'eastus2' - skuName: 'Standard_B1ms' + kind: 'StorageV2' + skuName: 'Standard_LRS' + allowBlobPublicAccess: false + blobServices: { + containers: [ + { + name: '{{context.resource.properties.containerName}}' + } + ] + } } outputs: { - host: 'fqdn' - port: 'port' - database: 'name' + endpoint: 'primaryBlobEndpoint' + accountName: 'name' + secrets: { + accountKey: 'primaryAccessKey' + connectionString: 'primaryConnectionString' + } } } } @@ -90,6 +102,8 @@ resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { } ``` +The resource's name becomes the Azure storage account name, so choose a globally unique name with 3 to 24 lowercase letters or digits. The `containerName` property selects the blob container. The nested `secrets` mapping sends the account key and connection string to Radius-managed secret storage rather than ordinary resource properties. The module retains its default network access restrictions; configure access for your application separately. + {{% /codetab %}} {{< /tabs >}} diff --git a/docs/content/reference/resources/radius.data/2025-08-01-preview/postgresqldatabases/index.md b/docs/content/reference/resources/radius.data/2025-08-01-preview/postgresqldatabases/index.md index 035d7de24..e8c63e3ad 100644 --- a/docs/content/reference/resources/radius.data/2025-08-01-preview/postgresqldatabases/index.md +++ b/docs/content/reference/resources/radius.data/2025-08-01-preview/postgresqldatabases/index.md @@ -73,7 +73,7 @@ The connection automatically injects environment variables into the container fo | `password` | string | (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}}`. | | `port` | integer | (Optional) The TCP port used to connect to the database. Defaults to `5432`, the standard PostgreSQL port that every Recipe in this repository provisions and the port PostgreSQL flexible server is fixed to. A Recipe that provisions the database on a different port reports the real port as an output, which overwrites this value once the deployment finishes. Setting it in an application definition changes only the value reported to connected containers, never the port the server listens on, so leave it unset. | | `size` | string | (Optional) The size of the PostgreSQL database. Defaults to `S` if not provided.