Remove dash between prefix and secret name in generated AWS secret name

Created on 17 July 2025, 19 days ago

Problem/Motivation

When setting a prefix for AWS Secrets (via the module configuration), the module appends the prefix to the secret name using a hardcoded dash (-). This is problematic in the following scenario:

  • Suppose a user sets the prefix to Dev/
  • And sets the secret name to google-api-key

The module will generate the AWS secret name as Dev/-google-api-key which is invalid or undesired.
This limits flexibility for users who want to construct fully qualified secret names like Dev/google-api-key.

Steps to reproduce

1- Go to the module's configuration page.
2- Set the prefix to Dev/
3- In the key configuration, set the secret name to google-api-key
4- Save and try to use the key provider.

Expected result:
AWS Secret name becomes Dev/google-api-key (user-controlled structure preserved).

Actual result:
Secret name becomes Dev/-google-api-key (extra dash inserted).

Proposed resolution

Remove the hardcoded dash (-) between the prefix and the secret name in the secretName() method.
This gives users full control over formatting (e.g. prefix = Dev/, secret_name = google-api-key).

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇯🇴Jordan Odai Atieh Amman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024