Skip to content

Small bundle to retrieve secrets from GCP Secrets Manager within a Symfony Project on runtime

License

Notifications You must be signed in to change notification settings

prauc/gcpsecretmanager-envvarprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony Custom GCP SecretManager EnvVarProcessor

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

About

Small bundle to retrieve secrets from GCP Secrets Manager within a Symfony Project on runtime

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages