sops_rename_secret
Rename a key in an existing SOPS-encrypted secrets file while preserving its value, type, and metadata, and update dependent references that use the old key.
Instructions
Rename a key in an existing SOPS-encrypted file. Preserves the value, source type, and metadata. Updates 'from' references in any derived secrets that depend on the renamed key. Requires a private key for the target domain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | Name of the key domain to encrypt to / decrypt with. Optional. Defaults to the domain recorded in the file's _meta_unencrypted block, and failing that to 'default'. Call sops_list_domains to see what this server has configured. | |
| new_name | Yes | New key name (must match ^[A-Z][A-Z0-9_]*$ and not collide with an existing key) | |
| old_name | Yes | Current key name | |
| encrypted_content | Yes | Contents of an existing secrets.enc.yaml file |