Skip to content

[FR] docker compose secrets transform JSON object #802

@pindab0ter

Description

@pindab0ter

Is your feature request related to a problem? Please describe.
When using a JSON object secret, you have to manually specify each and every value.

E.g.:

{"foo":"bar","baz":"qux"}

Would require:

x-secrets:
  Name: my-secrets
  JsonKeys:
    - SecretKey: foo
      VarName: FOO
    - SecretKey: baz
      VarName: BAZ

If I understand correctly from the documentation, it is also possible to do this instead:

x-secrets:
  Name: my-secrets
  JsonKeys:
    - SecretKey: foo
      Transform: uppercase
    - SecretKey: baz
      Transform: uppercase

The problem is that it is easy to forget to add secrets to this list when adding secrets in AWS.

Describe the solution you'd like

I would love to see something like @aws-actions/aws-secretsmanager-get-secrets’s parse-json-secrets option.

Since you already support transforming key names, it would be very useful to have an option that automatically parses all keys in the JSON secret, applies the specified transformation to each key, and exports them all without having to manually enumerate each key.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions