# Template ExternalSecret - Full Secret Object
#
# This template syncs an entire secret object from Vault.
# Use this when you have a secret object with multiple properties
# and want to import all of them at once.

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: app-all-secrets
  namespace: default  # CHANGE: Your application's namespace
spec:
  refreshInterval: 1h
  
  secretStoreRef:
    name: vault-secretstore  # CHANGE: Name of your SecretStore
    kind: SecretStore
  
  target:
    name: app-all-secrets
    creationPolicy: Owner
  
  # Use dataFrom to import an entire secret object
  dataFrom:
    - extract:
        key: my-app/all-secrets  # CHANGE: Path to the secret object in Vault
