xsqlinstances.aws.platform.upbound.io
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xsqlinstances.aws.platform.upbound.io
creationTimestamp: null
labels:
provider: aws
spec:
compositeTypeRef:
apiVersion: aws.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.region
type: FromCompositeFieldPath
resources:
- base:
apiVersion: rds.aws.upbound.io/v1beta1
kind: SubnetGroup
spec:
forProvider:
description: An excellent formation of subnetworks.
name: compositeSQLInstanceDbSubnetGroup
patches:
- patchSetName: providerConfigRef
type: PatchSet
- patchSetName: deletionPolicy
type: PatchSet
- patchSetName: region
type: PatchSet
- fromFieldPath: spec.parameters.networkRef.id
toFieldPath: spec.forProvider.subnetIdSelector.matchLabels[networks.aws.platform.upbound.io/network-id]
type: FromCompositeFieldPath
- base:
apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
spec:
forProvider:
dbName: upbound
dbSubnetGroupNameSelector:
matchControllerRef: true
instanceClass: db.t3.micro
publiclyAccessible: false
skipFinalSnapshot: true
username: masteruser
connectionDetails:
- fromFieldPath: status.atProvider.endpoint
name: endpoint
type: FromFieldPath
- fromFieldPath: status.atProvider.address
name: host
type: FromFieldPath
- fromFieldPath: spec.forProvider.username
name: username
type: FromFieldPath
- fromConnectionSecretKey: attribute.password
name: password
type: FromConnectionSecretKey
name: RDSInstanceSmall
patches:
- patchSetName: providerConfigRef
type: PatchSet
- patchSetName: deletionPolicy
type: PatchSet
- patchSetName: region
type: PatchSet
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- string:
fmt: "%s-sql"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.writeConnectionSecretToRef.namespace
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.engine
toFieldPath: spec.forProvider.engine
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.engineVersion
toFieldPath: spec.forProvider.engineVersion
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.storageGB
toFieldPath: spec.forProvider.allocatedStorage
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.networkRef.id
toFieldPath: spec.forProvider.vpcSecurityGroupIdSelector.matchLabels[networks.aws.platform.upbound.io/network-id]
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.autoGeneratePassword
toFieldPath: spec.forProvider.autoGeneratePassword
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.passwordSecretRef.namespace
toFieldPath: spec.forProvider.passwordSecretRef.namespace
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.passwordSecretRef.name
toFieldPath: spec.forProvider.passwordSecretRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.passwordSecretRef.key
toFieldPath: spec.forProvider.passwordSecretRef.key
type: FromCompositeFieldPath
writeConnectionSecretsToNamespace: upbound-system