Jinja2 extension for fetching secrets GCP Secret Manager
Project description
jinja2-gcp-secret-manager
Jinja2 extension for fetching secrets GCP Secret Manager
Install
pip install jinja2-gcp-secret-manager
Usage
# template.j2
Secret is {% gcp_secret "secret-name" %}
# By default, the latest version is fetched, for specific version use:
2nd version of secret is {% gcp_secret "secret-name" version=2 %}
# If you are using Application default credentials or want to explicitly specify
the project where the secrets should be found, add the `project` term:
3rd version of secret is {% gcp_secret "secret-name" version=2 project="abc123" %}
GCP Setup
For this to work, make sure you either setup the GOOGLE_APPLICATION_CREDENTIALS
environment variable set to the correct file path or use Application default credentials. See https://google-auth.readthedocs.io/en/latest/user-guide.html for more details.
Note: If you use Application default credentials, you will need to specify project in all gcp_secret
tags as default project cannot be determined as it can with a service account.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jinja2-gcp-secret-manager-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64983feab251ebd0bdc7b229e5ae738ad0cc7dbbd3826b2ede7b188b4c995f80 |
|
MD5 | e3f6d31a237483d79837fcd6f178d9ca |
|
BLAKE2b-256 | aa0f87e3ebe37989665d5bc37b893bf2debbedaeee2cf0593261499bcb8bc0bf |
Close
Hashes for jinja2_gcp_secret_manager-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f41e39c8551a96499bcf658cc395667a8a379ab6ad14e5690bc11fd51f3e02e |
|
MD5 | 21f7c013bcbb7ec77e53223d53373787 |
|
BLAKE2b-256 | abaae1864cf09af5d534cccedbc69cf9950274e05945903d77dddd30a84f93f3 |