client.secrets.get_secret_by_name() fetches one secret from a folder in an environment of a project. The machine identity needs a role in the project that can read secrets, such as Viewer.
Parameters
The ID of the project. Pass
project_id or project_slug. If you pass both, the SDK uses project_id.The version of the secret to fetch. Defaults to the latest version. The cache ignores the version, so turn the cache off to fetch an older version.
Whether to also look for the secret in the folder’s secret imports.
Whether to replace each secret reference in the value with the value it points to.