secretary / gcp-secret-manager-adapter
GCP Secrets Manager Adapter for Secretary
Package info
github.com/secretary/php-gcp-secrets-manager-adapter
pkg:composer/secretary/gcp-secret-manager-adapter
4.3.0
2026-02-09 18:21 UTC
Requires
- php: ^8.2
- ext-json: *
- google/cloud-secret-manager: ^1.0
- secretary/core: ^3.0
README
GCP Secrets Manager Adapter for Secretary
Table of Contents
Installation
$ composer require secretary/core secretary/gcp-secret-manager-adapter
Configuration
use Secretary\Adapter\GCP\SecretsManager\GCPSecretsManagerAdapter; $adapter = new GCPSecretsManagerAdapter([ 'project_id' => 'your-gcp-project-id', // Optional: path to credentials file or credentials array // If not provided, uses Application Default Credentials (ADC) 'credentials' => '/path/to/service-account.json', ]);
Options
Constructor Options
| Option | Type | Required | Description |
|---|---|---|---|
project_id |
string | Yes | Your GCP project ID |
credentials |
string|array | No | Path to service account JSON file or credentials array. Uses ADC if not provided. |
getSecret Options
| Option | Type | Default | Description |
|---|---|---|---|
version |
string | "latest" |
Secret version to retrieve |