xpostgresqlinstances.azure.database.example.org
The following resources are composed to implement the referenced Composite Resource Definition (XRD).
ResourceGroup
PostgreSQLServer
PostgreSQLServerFirewallRule
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xpostgresqlinstances.azure.database.example.org
creationTimestamp: null
labels:
guide: quickstart
provider: azure
spec:
compositeTypeRef:
apiVersion: database.example.org/v1alpha1
kind: XPostgreSQLInstance
resources:
- name: resourcegroup
base:
apiVersion: azure.crossplane.io/v1alpha3
kind: ResourceGroup
spec:
location: West US 2
- name: postgresqlserver
base:
apiVersion: database.azure.crossplane.io/v1beta1
kind: PostgreSQLServer
spec:
forProvider:
administratorLogin: myadmin
location: West US 2
resourceGroupNameSelector:
matchControllerRef: true
sku:
capacity: 2
family: Gen5
tier: GeneralPurpose
sslEnforcement: Disabled
storageProfile:
storageMB: 5120
version: "11"
writeConnectionSecretToRef:
namespace: crossplane-system
patches:
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- type: string
string:
fmt: "%s-postgresql"
- fromFieldPath: spec.parameters.storageGB
toFieldPath: spec.forProvider.storageProfile.storageMB
transforms:
- type: math
math:
multiply: 1024
connectionDetails:
- fromConnectionSecretKey: username
- fromConnectionSecretKey: password
- fromConnectionSecretKey: endpoint
- name: port
type: FromValue
value: "5432"
- name: firewallrule
base:
apiVersion: database.azure.crossplane.io/v1alpha3
kind: PostgreSQLServerFirewallRule
spec:
forProvider:
properties:
endIpAddress: 255.255.255.254
startIpAddress: 0.0.0.0
resourceGroupNameSelector:
matchControllerRef: true
serverNameSelector:
matchControllerRef: true
writeConnectionSecretsToNamespace: crossplane-system