GithubHelp home page GithubHelp logo

yashmehrotra / jinja2-gcp-secret-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 3.0 15 KB

Jinja2 extension for fetching secrets GCP Secret Manager

License: Apache License 2.0

Makefile 5.59% Python 94.41%
gcp google-cloud-platform google-secret-manager jinja2 jinja jinja2-extension secret-management

jinja2-gcp-secret-manager's Introduction

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.

jinja2-gcp-secret-manager's People

Contributors

coreone avatar yashmehrotra avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.