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?
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:
Results in:
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?