Metadata-Version: 2.1
Name: jinja2-gcp-secret-manager
Version: 1.1.0
Summary: Jinja2 extension for fetching secrets GCP Secret Manager
Home-page: https://github.com/yashmehrotra/jinja2-gcp-secret-manager
Author: Yash Mehrotra
Author-email: yashmehrotra95@gmail.com
License: Apache 2.0
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: Jinja2 (==2.11.3)
Requires-Dist: google-cloud-secret-manager (==2.2.0)
Requires-Dist: google-api-core[grpc] (==1.25.1)
Requires-Dist: grpc-google-iam-v1 (==0.12.3)
Requires-Dist: proto-plus (==1.13.0)
Requires-Dist: libcst (>=0.2.5)
Requires-Dist: protobuf (==3.14.0)
Requires-Dist: googleapis-common-protos (==1.52.0)

# jinja2-gcp-secret-manager

Jinja2 extension for fetching secrets GCP Secret Manager

## Install

```sh
pip install jinja2-gcp-secret-manager
```

## Usage

```jinja2
# 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](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.


