sops_add_metadata
Adds metadata to SOPS-encrypted files by decrypting, inserting secret metadata, and re-encrypting without altering plaintext values.
Instructions
Add _meta_unencrypted metadata to an existing SOPS-encrypted file that lacks it. Decrypts the file, adds metadata, and re-encrypts preserving original plaintext values. Requires SOPS_AGE_KEY env var for decryption.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encrypted_content | Yes | Contents of a secrets.enc.yaml file | |
| secret_metadata | Yes | Mapping of key names to metadata. Each value has 'source' ('generated', 'external', or 'derived') and optional 'description'. For 'derived', also provide 'transform' and 'from'. |