Marketplace
BrowsePublish
Marketplace
xp/getting-started-with-azure@v1.13.2
xpostgresqlinstances.azure.database.example.org

xpostgresqlinstances.azure.database.example.org

xpostgresqlinstances.azure.database.example.org
xp/getting-started-with-azure@v1.13.2xpostgresqlinstances.azure.database.example.org
Type

Composition

Referenced XRD

XPostgreSQLInstance

Source Codegithub.com/crossplane/crossplane
Resources (3)

The following resources are composed to implement the referenced Composite Resource Definition (XRD).

Kind
Group
Version

ResourceGroup

azure.crossplane.io
v1alpha3

PostgreSQLServer

database.azure.crossplane.io
v1beta1

PostgreSQLServerFirewallRule

database.azure.crossplane.io
v1alpha3
YAML
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
Marketplace

Discover the building blocks for your internal cloud platform.

© 2022 Upbound, Inc.

SolutionsProvidersConfigurations
LearnDocumentationTry for Free
MorePrivacy PolicyTerms & Conditions
Marketplace

© 2022 Upbound, Inc.

Marketplace

Discover the building blocksfor your internal cloud platform.