Marketplace
BrowsePublish
Marketplace
upbound/platform-ref-gcp@v0.7.0
xpostgresqlinstances.gcp.platformref.upbound.io

xpostgresqlinstances.gcp.platformref.upbound.io

xpostgresqlinstances.gcp.platformref.upbound.io
upbound/platform-ref-gcp@v0.7.0xpostgresqlinstances.gcp.platformref.upbound.io
Type

Composition

Referenced XRD

XPostgreSQLInstance

Source Codegithub.com/upbound/platform-ref-gcp
Resources (4)

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

Kind
Group
Version

GlobalAddress

compute.gcp.upbound.io
v1beta1

Connection

servicenetworking.gcp.upbound.io
v1beta1

User

sql.gcp.upbound.io
v1beta1

DatabaseInstance

sql.gcp.upbound.io
v1beta1
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: xpostgresqlinstances.gcp.platformref.upbound.io
  creationTimestamp: null
  labels:
    provider: gcp
spec:
  compositeTypeRef:
    apiVersion: gcp.platformref.upbound.io/v1alpha1
    kind: XPostgreSQLInstance
  resources:
    - name: PrivateIPAddress
      base:
        apiVersion: compute.gcp.upbound.io/v1beta1
        kind: GlobalAddress
        spec:
          forProvider:
            addressType: INTERNAL
            prefixLength: 16
            purpose: VPC_PEERING
      patches:
        - fromFieldPath: spec.parameters.clusterRef.id
          toFieldPath: spec.forProvider.networkSelector.matchLabels[networks.gcp.platformref.upbound.io/network-id]
    - name: PrivateConnection
      base:
        apiVersion: servicenetworking.gcp.upbound.io/v1beta1
        kind: Connection
        spec:
          forProvider:
            reservedPeeringRangesSelector:
              matchControllerRef: true
            service: servicenetworking.googleapis.com
      patches:
        - fromFieldPath: spec.parameters.clusterRef.id
          toFieldPath: spec.forProvider.networkSelector.matchLabels[networks.gcp.platformref.upbound.io/network-id]
    - name: DatabaseUser
      base:
        apiVersion: sql.gcp.upbound.io/v1beta1
        kind: User
        spec:
          forProvider:
            instanceSelector:
              matchControllerRef: true
      patches:
        - fromFieldPath: spec.parameters.passwordSecretRef.namespace
          toFieldPath: spec.forProvider.passwordSecretRef.namespace
        - fromFieldPath: spec.parameters.passwordSecretRef.name
          toFieldPath: spec.forProvider.passwordSecretRef.name
        - fromFieldPath: spec.parameters.passwordSecretRef.key
          toFieldPath: spec.forProvider.passwordSecretRef.key
    - name: DBInstance
      base:
        apiVersion: sql.gcp.upbound.io/v1beta1
        kind: DatabaseInstance
        spec:
          forProvider:
            databaseVersion: POSTGRES_13
            deletionProtection: false
            region: us-west2
            settings:
              - diskSize: 20
                tier: db-f1-micro
      patches:
        - fromFieldPath: metadata.uid
          toFieldPath: spec.writeConnectionSecretToRef.name
          transforms:
            - type: string
              string:
                fmt: "%s-gcp-postgresql"
        - fromFieldPath: spec.writeConnectionSecretToRef.namespace
          toFieldPath: spec.writeConnectionSecretToRef.namespace
        - fromFieldPath: spec.parameters.storageGB
          toFieldPath: spec.forProvider.settings[0].diskSize
        - fromFieldPath: spec.parameters.clusterRef.id
          toFieldPath: spec.forProvider.settings[0].ipConfiguration[0].privateNetworkRef.name
      connectionDetails:
        - fromConnectionSecretKey: privateIP
        - fromConnectionSecretKey: serverCACertificateCert
  writeConnectionSecretsToNamespace: upbound-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.