1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/docs/snippets/ibm-external-secret-with-metadata.yaml
Evan f44ef56646
IBM Provider: Fix documentation templating errors (#2564)
* Move examples added in 3ab04767a5 to a snippet so they do not conflict with the mkdocs-macros plugin

Signed-off-by: Evan Bluhm <embluhm@uw.edu>
2023-07-31 22:43:50 +02:00

27 lines
713 B
YAML

{% raw %}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: database-credentials
namespace: external-secrets
spec:
dataFrom:
- extract:
key: username_password/<SECRET_ID>
metadataPolicy: Fetch # leveraging optional parameter, defaults to None
secretKey: username
secretStoreRef:
kind: SecretStore
name: ibm-store
target:
name: database-credentials
template:
engineVersion: v2
data:
secret: "{{ .password }}"
metadata:
annotations:
secret_id: "{{ .id }}" # adding metadata key whose value would be added to the secret as a label
updated_at: "{{ .updated_at }}"
{% endraw %}