# Google Secret Manager variable resolver

### Functionality

This variable resolver can retrieve secrets from Google Secret Manager.

Here are the options to use:

* Project ID: The project ID to reference.
* Location ID: The location ID (Optional)

The variable expression you can resolve with this plugin type is (as always) in the following format:

`#{name:secret-id:value-key}`

* name: the name of the variable resolver metadata element to use
* path-key: the ID of the secret to retrieve.
* value-key: the key of the value to retrieve in case the value is JSON.

In case we don’t specify a `value-key`, you will give back the complete string of the secret.

### Example

Suppose we have a secret defined in JSON format in Secret Manager:

image:metadata-types/variable-resolver/gcp-secret-manager-server.png

We can define a connection called `google-secret` and retrieve values with expressions:

* `#{google-secret:json-secret:hostname}` : localhost
* `#{google-secret:json-secret:username}` : john
* `#{google-secret:json-secret}` : `{"db":"test","hostname":"localhost","password":"some-password","port":"3306","username":"john"}`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/index-2/index/google-secret-manager-variable-resolver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
