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

Support valueFrom against specific variable names #407

Open
KashifSaadat opened this issue Sep 14, 2022 · 0 comments
Open

Support valueFrom against specific variable names #407

KashifSaadat opened this issue Sep 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@KashifSaadat
Copy link
Member

KashifSaadat commented Sep 14, 2022

Currently you can specify valueFrom to retrieve variables from Kubernetes Secrets, as follows:

spec:
  valueFrom:
  - secret: db-details
    key: database-password

This translates to the following Terranetes Configuration Spec:

spec:
  variables:
    database-password: <secret_value>

This has a limitation in that the Secret Key Name must match precisely the Terraform Variable name that the module requires. If you cannot change the variable expected in the module you are using, then you must either manually create a new secret (if it's pre-existing) with the Key Name as expected, or fork and modify the Terraform Module so the variable name matches your secret key.

It would be nice to support valueFrom as a type on a variable itself, for example:

spec:
  variables:
    username: "mydbuser"
    password:
      valueFrom:
        secret: db-details
        key: database-password
        optional: false
    vpc_security_group_ids:
    - valueFrom:
        secret: db-details
        key: database-security-group-id
        optional: false
@KashifSaadat KashifSaadat added the enhancement New feature or request label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant