PostgresFlexibleServer
resourceType postgresql · provider azure · sharing Private · cleanup Orphan
Provisions a managed Azure Database for PostgreSQL Flexible Server with a single application database. Sized dev→prod: production sets highAvailabilityMode, a larger SKU, geo-redundant backups, longer retention, and a private endpoint; dev takes the Burstable defaults with public access closed.
Request it
Add this to your PlatformApplication's spec.resourceRequirements (optional parameters are in the table below):
resourceRequirements:
- resourceType: postgresql
provider: azure # selects this backend — the cluster default may differ
resourceName: my-postgresql # your handle — drives the env-var prefix + secret name
parameters:
databaseName: "<value>"
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
databaseName | string | yes | — | Name of the application database to create on the server. |
shared | string | no | false | Provision as THE shared server for the environment ('true'/'false'): deterministic name/FQDN (pgsql-shared-{uniqueSuffix}) plus an emitted provider-sql ProviderConfig. Set by the postgres-shared-server--azure capability; leave false for a dedicated server. |
administratorLogin | string | no | pgadmin | Server administrator login name (immutable after create). |
postgresVersion | string | no | 16 | PostgreSQL major version. |
skuName | string | no | B_Standard_B1ms | Azure Flexible Server SKU (e.g. B_Standard_B1ms for dev, GP_Standard_D2ds_v5 for prod). ZoneRedundant HA requires a GeneralPurpose/MemoryOptimized SKU. |
storageGb | string | no | 32 | Storage size in GiB (converted to storageMb). |
autoGrow | string | no | true | Enable storage auto-grow ('true'/'false'). |
backupRetentionDays | string | no | 7 | Backup retention window in days (7-35). |
geoRedundantBackup | string | no | false | Enable geo-redundant backups for DR ('true'/'false'). Recommended for production. |
highAvailabilityMode | string | no | `` | High-availability mode. Empty/Disabled = single instance. |
standbyZone | string | no | — | Availability zone for the standby replica (ZoneRedundant HA only). |
zone | string | no | — | Availability zone for the primary instance. |
publicNetworkAccess | string | no | false | Allow public network access ('true'/'false'). Defaults closed; production should use a private endpoint instead. |
allowAzureServices | string | no | false | Allow Azure services (including in-cluster AKS workloads) to reach the server over the public endpoint, by adding a 0.0.0.0 firewall rule ('true'/'false'). Only applied when publicNetworkAccess is true. |
firewallRules | string | no | [] | Explicit firewall rules as a JSON array, e.g. '[{"name":"office","startIpAddress":"203.0.113.4","endIpAddress":"203.0.113.4"}]'. Only applied when publicNetworkAccess is true. |
createPrivateEndpoint | string | no | false | Create a private endpoint for the server ('true'/'false'). Requires privateEndpointSubnetId. |
privateEndpointSubnetId | string | no | — | Subnet resource ID for the private endpoint. |
createPrivateDns | string | no | false | Create a private DNS zone + VNet link for the server ('true'/'false'). Requires createPrivateEndpoint and privateDnsVnetId. |
privateDnsVnetId | string | no | — | Virtual network resource ID to link the private DNS zone to. |
charset | string | no | UTF8 | Database character set. |
collation | string | no | en_US.utf8 | Database collation. |
Connection
On grant, a connection secret is published with these tokens and injected into your workload as {RESOURCENAME}_{TOKEN} (UPPER_SNAKE) — e.g. resourceName: my-postgresql → MY_POSTGRESQL_HOST, MY_POSTGRESQL_PORT, …:
hostportusernamepassworddbname
Status
| Field | Description |
|---|---|
serverName | Name of the Azure Flexible Server. |
fqdn | Fully-qualified domain name of the server. |
databaseName | Name of the application database. |
Auto-generated from the PostgresFlexibleServer XRD + postgresql--azure ResourceCapability. Do not edit by hand.