Marketplace
BrowsePublish
Marketplace
upbound/configuration-azure-database@v0.11.1
xmariadbinstances.azure.platform.upbound.io

xmariadbinstances.azure.platform.upbound.io

xmariadbinstances.azure.platform.upbound.io
upbound/configuration-azure-database@v0.11.1xmariadbinstances.azure.platform.upbound.io
Type

Composition

Referenced XRD

XSQLInstance

Source Codegithub.com/upbound/configuration-azure-database
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: xmariadbinstances.azure.platform.upbound.io
  creationTimestamp: null
  labels:
    dbengine: mariadb
    provider: azure
spec:
  compositeTypeRef:
    apiVersion: azure.platform.upbound.io/v1alpha1
    kind: XSQLInstance
  mode: Pipeline
  pipeline:
    - step: patch-and-transform
      functionRef:
        name: crossplane-contrib-function-patch-and-transform
      input:
        apiVersion: pt.fn.crossplane.io/v1beta1
        kind: Resources
        patchSets:
          - name: providerConfigRef
            patches:
              - fromFieldPath: spec.parameters.providerConfigName
                toFieldPath: spec.providerConfigRef.name
                type: FromCompositeFieldPath
          - name: deletionPolicy
            patches:
              - fromFieldPath: spec.parameters.deletionPolicy
                toFieldPath: spec.deletionPolicy
                type: FromCompositeFieldPath
          - name: region
            patches:
              - fromFieldPath: spec.parameters.region
                toFieldPath: spec.forProvider.location
                type: FromCompositeFieldPath
        resources:
          - base:
              apiVersion: dbformariadb.azure.upbound.io/v1beta1
              kind: Server
              spec:
                forProvider:
                  administratorLogin: xp-admin
                  skuName: GP_Gen5_2
                  sslEnforcementEnabled: false
                  sslMinimalTlsVersionEnforced: TLSEnforcementDisabled
            connectionDetails:
              - fromFieldPath: status.atProvider.fqdn
                name: host
                type: FromFieldPath
              - fromConnectionSecretKey: username
                name: username
                type: FromConnectionSecretKey
              - fromConnectionSecretKey: password
                name: password
                type: FromConnectionSecretKey
              - fromConnectionSecretKey: port
                name: port
                type: FromConnectionSecretKey
            name: mariadlserver
            patches:
              - patchSetName: providerConfigRef
                type: PatchSet
              - patchSetName: deletionPolicy
                type: PatchSet
              - patchSetName: region
                type: PatchSet
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: metadata.name
                transforms:
                  - string:
                      fmt: "%s-mariadb"
                      type: Format
                    type: string
                type: FromCompositeFieldPath
              - fromFieldPath: spec.writeConnectionSecretToRef.namespace
                toFieldPath: spec.writeConnectionSecretToRef.namespace
                type: FromCompositeFieldPath
              - fromFieldPath: metadata.uid
                toFieldPath: spec.writeConnectionSecretToRef.name
                transforms:
                  - string:
                      fmt: "%s-mariadb"
                      type: Format
                    type: string
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.storageGB
                toFieldPath: spec.forProvider.storageMb
                transforms:
                  - math:
                      multiply: 1024
                      type: Multiply
                    type: math
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: spec.forProvider.resourceGroupNameSelector.matchLabels[azure.platform.upbound.io/network-id]
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.passwordSecretRef.namespace
                toFieldPath: spec.forProvider.administratorLoginPasswordSecretRef.namespace
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.passwordSecretRef.name
                toFieldPath: spec.forProvider.administratorLoginPasswordSecretRef.name
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.passwordSecretRef.key
                toFieldPath: spec.forProvider.administratorLoginPasswordSecretRef.key
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.version
                toFieldPath: spec.forProvider.version
                type: FromCompositeFieldPath
          - base:
              apiVersion: dbformariadb.azure.upbound.io/v1beta1
              kind: VirtualNetworkRule
              spec:
                forProvider:
                  serverNameSelector:
                    matchControllerRef: true
            name: vnetrule
            patches:
              - patchSetName: providerConfigRef
                type: PatchSet
              - patchSetName: deletionPolicy
                type: PatchSet
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: metadata.name
                transforms:
                  - string:
                      fmt: "%s-sn-rule"
                      type: Format
                    type: string
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: spec.forProvider.subnetIdSelector.matchLabels[azure.platform.upbound.io/network-id]
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: spec.forProvider.resourceGroupNameSelector.matchLabels[azure.platform.upbound.io/network-id]
                type: FromCompositeFieldPath
          - base:
              apiVersion: dbformariadb.azure.upbound.io/v1beta1
              kind: Database
              spec:
                forProvider:
                  charset: utf8
                  collation: utf8_general_ci
                  serverNameSelector:
                    matchControllerRef: true
            name: database
            patches:
              - patchSetName: providerConfigRef
                type: PatchSet
              - patchSetName: deletionPolicy
                type: PatchSet
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: metadata.name
                transforms:
                  - match:
                      fallbackValue: null
                      patterns:
                        - regexp: .*
                          result: upbound
                          type: regexp
                    type: match
                type: FromCompositeFieldPath
              - fromFieldPath: spec.parameters.networkRef.id
                toFieldPath: spec.forProvider.resourceGroupNameSelector.matchLabels[azure.platform.upbound.io/network-id]
                type: FromCompositeFieldPath
  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.