1---
2layout: "docs"
3page_title: "Vault Agent Auto-Auth GCP Method"
4sidebar_title: "GCP"
5sidebar_current: "docs-agent-autoauth-methods-gcp"
6description: |-
7  GCP Method for Vault Agent Auto-Auth
8---
9
10# Vault Agent Auto-Auth GCP Method
11
12The `gcp` method performs authentication against the [GCP Auth
13method](https://www.vaultproject.io/docs/auth/gcp.html). Both `gce` and `iam`
14authentication types are supported.
15
16## Credentials
17
18Vault will use the GCP SDK's normal credential chain behavior. You can set a
19static `credentials` value but it is usually not needed. If running on GCE
20using Application Default Credentials, you may need to specify the service
21account and project since ADC does not provide metadata used to automatically
22determine these.
23
24## Configuration
25
26- `type` `(string: required)` - The type of authentication; must be `gce` or `iam`
27
28- `role` `(string: required)` - The role to authenticate against on Vault
29
30- `credentials` `(string: optional)` - When using static credentials, the
31  contents of the JSON credentials file
32
33- `service_account` `(string: optional)` - The service account to use, if it
34  cannot be automatically determined
35
36- `project` `(string: optional)` - The project to use, if it cannot be
37  automatically determined
38
39- `jwt_exp` `(string or int: optional)` - The number of minutes a generated JWT
40  should be valid for when using the `iam` method; defaults to 15 minutes
41