rauchfuss-io / gcpsecretmanager-envvarprocessor
A small Symfony Custom EnvVarProcessor bundle for retrieving Secrets from GCP Secret Manager
v1.1.6
2020-09-03 10:18 UTC
Requires
- php: >=7.2.5
- google/cloud-secret-manager: ^1.0
- symfony/dependency-injection: ^4.4|^5.0
This package is auto-updated.
Last update: 2025-03-29 00:51:33 UTC
README
What is this EnvVarProcessor for the GCP Secret Manager?
This bundle will help you to retrieve secrets from GCP Secret Manager on runtime. Define this service within your Symfony services.yaml by adding the following:
Rauchfussio\GCPSecretManagerEnvVarProcessor\: resource: '../vendor/rauchfuss-io/gcpsecretmanager-envvarprocessor/src/*' tags: ['container.env_var_processor'] arguments: $gcpProjectId: 'YOUR GCP PROJECTID' $gcpCredentialsFile: 'YOUR SERVICE ACCOUNT PRIVATE KEY'
Now you can define which secrets you want to request on runtime:
App\Controller\DefaultController: class: 'App\Controller\DefaultController' arguments: $secret: '%env(string:gcpsecretmanager:YOURSECRET)%'
Installation
- Require the bundle with composer:
composer require rauchfuss-io/gcpsecretmanager-envvarprocessor