Skip to content

VSS: Add key templating for transformed secret data - #1284

Open
jenneron wants to merge 1 commit into
hashicorp:mainfrom
jenneron:key-template
Open

VSS: Add key templating for transformed secret data#1284
jenneron wants to merge 1 commit into
hashicorp:mainfrom
jenneron:key-template

Conversation

@jenneron

@jenneron jenneron commented Jun 11, 2026

Copy link
Copy Markdown

We want to implement the use of this operator, however we have a lot of secrets that have keys like db, connection, etc which we need to result in kubernetes secrets with corresponding keys db.json, connection.json to mount in our pods.

Current transformation only allows to hardcode new name for a specific key, but doesn't allow to dynamically change names of all keys in the secret.

This change allows that by adding keyTemplate to secret transformations so source secret data keys can be renamed with a Go template before being written to the destination Kubernetes Secret.

for example:

spec:
  destination:
    create: true
    name: test
    overwrite: false
    transformation:
      keyTemplate: "{{ .Name }}.json"

This makes:
db -> db.json
connection -> connection.json


PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@jenneron
jenneron requested review from a team as code owners June 11, 2026 15:54
@hashicorp-cla-app

hashicorp-cla-app Bot commented Jun 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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