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 details)
Built Distribution
File details
Details for the file python-tfvars-0.1.0.tar.gz
.
File metadata
- Download URL: python-tfvars-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c1a641b0da0273028a8ca383414a35e000474f3e9ab228608ff9c93cf947e80 |
|
MD5 | f55f5cc48fabf26bd9bb796a46db1d9c |
|
BLAKE2b-256 | 98c7e0fee0ac775091ba98b5e0d25a9412754d9b48a3d298bb62855fba6d4dad |
File details
Details for the file python_tfvars-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: python_tfvars-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 455134192d3ca735fe83ac26fb70be638170b2a8dd82ec6a94b30746f589bd74 |
|
MD5 | 8cfaf11975b3896ff2f8ec791fbaeff5 |
|
BLAKE2b-256 | aa36c9a67ea161969c5b4baf7d48769c5f69a627266813fe0752bb856c468428 |