secretary / gcp-secret-manager-adapter
GCP Secrets Manager Adapter for Secretary
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/secretary/gcp-secret-manager-adapter
Requires
- php: ^8.2
- ext-json: *
- google/cloud-secret-manager: ^1.0
- secretary/core: ^3.0
Requires (Dev)
- mockery/mockery: ^1.6.12
- phpunit/phpunit: ^10.5 || ^11.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 |