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.
Metadata
Release files for jinja2-gcp-secret-manager 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jinja2-gcp-secret-manager-1.2.0.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jinja2_gcp_secret_manager-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / jinja2-gcp-secret-manager-1.2.0.tar.gz
| Download URL | jinja2-gcp-secret-manager-1.2.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58b5279e602741de2e00703db338f5bf558c4281dc2c496caeac870ad70ff6c0
|
|
BLAKE2b-256 checksum How to use checksums |
07cf072d0360b8a0c59272390a6af11c5d101f50738686e94012604d598373d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|
Release files / jinja2_gcp_secret_manager-1.2.0-py3-none-any.whl
| Download URL | jinja2_gcp_secret_manager-1.2.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48b673536522c63a963da333c0b75090794d86cc75d717876e8959da7664d47d
|
|
BLAKE2b-256 checksum How to use checksums |
90f0edc5c7e0e332c4060489336f898df91254aafcda9dd1a72eb81d8f1e8f7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|