Skip to content

Regional secrets are not loading #919

@sandcomputas

Description

@sandcomputas

I have a project in which I am trying to use regional secrets due to company policy. However, when I try to refer to a regional secret I get errors.

Example:

        val projectId = "my_project"
        val secretName = "my_secret"
        val svn = SecretVersionName.ofProjectLocationSecretSecretVersionName(projectId, "europe-west1", secretName, "latest")
        val response = secretManagerServiceClient.accessSecretVersion(svn)

Results in:

Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: The provided Secret ID [projects/my_project/locations/europe-west1/secrets/my_secret/versions/latest] does not match the expected format [projects/*/secrets/*/versions/*]

When running the equivalent code for a global secret (SecretVersionName.of(projectId, "my_secret", "latest")) everything works just fine.

Also when using the property file syntax in an application.properties file the secret cannot be retrieved, even when referring to the absolute path.

Am I missing something here or is support for regional secrets not implemented yet?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions