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

Error expanding GCP secrets #291

Open
dovvla opened this issue Mar 25, 2024 · 3 comments
Open

Error expanding GCP secrets #291

dovvla opened this issue Mar 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dovvla
Copy link

dovvla commented Mar 25, 2024

Hi,

I have an issue where when I try to reference secret from gcpsecrets additional fields get concatenated to the URI. To be more precise, here is what happened:

#values.yaml
  defaultDbPassword: ref+gcpsecrets://<project_name>/<secret_name>
  database:
    default:
      writeHostUrl: "127.0.0.2"
      readOnlyHostUrl: "127.0.0.3"
      database: <db_name>

Upon running helm secrets --evaluate-templates upgrade --install the following error is thrown:

expand gcpsecrets://<project_name>/<secret_name>@tcp(127.0.0.2)/<db_name>: failed to get secret: rpc error: code = InvalidArgument desc = The provided Secret ID [projects/<project_name>/secrets/t<secret_name>@tcp(127.0.0.2)/<db_name>/versions/latest] does not match the expected format [projects/*/secrets/*/versions/*]'
@yxxhero yxxhero added the bug Something isn't working label Apr 24, 2024
@yxxhero
Copy link
Member

yxxhero commented Apr 24, 2024

@dovvla PR is welcome.

@sonnysideup
Copy link

@yxxhero Your response is not helpful because the problem has not even been identified.

@dovvla try passing the secret with a version field, likeref+gcpsecrets://<project_name>/<secret_name>?version=1 as example. I think you can use latest as the version value, but I don't remember at this point.

@aslafy-z
Copy link
Contributor

aslafy-z commented Jun 21, 2024

I think this issue should go to helm-secrets

@dovvla Try with defaultDbPassword: ref+gcpsecrets://<project_name>/<secret_name>+ (a + at the end).
See https://github.com/helmfile/vals#expression-syntax for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants