kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xauths.sec.upbound.io
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: sec.upbound.io/v1alpha1
kind: XAuth
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: upbound-function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- base:
apiVersion: auth.vault.upbound.io/v1alpha1
kind: Backend
spec:
deletionPolicy: Delete
forProvider:
description: Userpass auth backend for UXP managed Vault.
disableRemount: false
type: userpass
name: userpass-auth-backend
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
transforms:
- string:
fmt: "%s-backend-userpass"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: status.atProvider
toFieldPath: status.vaultAuthBackendUserpass
type: ToCompositeFieldPath
- base:
apiVersion: generic.vault.upbound.io/v1alpha1
kind: Endpoint
spec:
deletionPolicy: Delete
forProvider:
disableDelete: false
disableRead: false
ignoreAbsentFields: true
name: generic-endpoint
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
transforms:
- string:
fmt: "%s-generic-endpoint"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.user
policy:
fromFieldPath: Required
toFieldPath: spec.forProvider.path
transforms:
- string:
fmt: auth/userpass/users/%s
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.dataJsonSecretRef
toFieldPath: spec.forProvider.dataJsonSecretRef
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: status.atProvider
toFieldPath: status.vaultGenericEndpoint
type: ToCompositeFieldPath
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: generic.vault.upbound.io/v1alpha1
kind: Endpoint
resourceSelector:
matchControllerRef: true
of:
apiVersion: auth.vault.upbound.io/v1alpha1
kind: Backend
resourceSelector:
matchControllerRef: true
name: usageAuthBackendByGenericEndpoint
readinessChecks:
- type: None
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.