Error expanding GCP secrets
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/*]'
@dovvla PR is welcome.
@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.
~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.