Skip to main content

read secrets from terraform tfvars files

Project description

python-tfvars

read secrets from terraform tfvars

This module will read variables from terraform tfvars files to facilitate the usage of python scripts from terraform resources.

Currently we do not support json format.

basic usage

Assuming a terraform.tfvars file as follows:

token = "some_token"

in your python script:

import tfvars

tfv = tfvars.LoadSecrets()
print(tfv["token"])

optionally specify a file location:

tfv = tfvars.LoadSecrets("../dev.auto.tfvars")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-tfvars-0.1.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

python_tfvars-0.1.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page