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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58b5279e602741de2e00703db338f5bf558c4281dc2c496caeac870ad70ff6c0 |
|
MD5 | 58dfb5a0286b19a7d9404f3ba8058292 |
|
BLAKE2b-256 | 07cf072d0360b8a0c59272390a6af11c5d101f50738686e94012604d598373d7 |
Close
Hashes for jinja2_gcp_secret_manager-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48b673536522c63a963da333c0b75090794d86cc75d717876e8959da7664d47d |
|
MD5 | ade7e73c4cbe39faa316ee727a3af31f |
|
BLAKE2b-256 | 90f0edc5c7e0e332c4060489336f898df91254aafcda9dd1a72eb81d8f1e8f7d |