Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix template rendering with renamed secrets #726

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DSeeLP
Copy link

@DSeeLP DSeeLP commented Feb 14, 2025

modules/templates/default.nix generates the placeholders manifest entry by using the name of the secret in the sops.secrets attrset. sops-install-secrets looked up the placeholder using the secret name and resolved to the wrong secret when a secret was renamed.

This renames the entry in the manifest from placeholderBySecretName to placeholderBySecretKey and changes the lookup to use the key instead of the name.

This fixes my issue in #688 but results in a new issue that there can be multiple keys.

I think another solution would be to store the secrets in the manifest in an object instead of a list and use the name of the secret in the sops.secrets attrset as the key.

modules/templates/default.nix generates the placeholders manifest entry
by using the name of the secret in the `sops.secrets` attrset.
sops-install-secrets looked up the placeholder using the secret name and
resolved to the wrong secret when a secret was renamed.

This renames the entry in the manifest from `placeholderBySecretName`
to `placeholderBySecretKey` and changes the lookup to use the key instead
of the name.

Fixes Mic92#688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant