Terrajinja extension for automation using cdktf
Project description
terrajinja-sbp-vault
This is an extension to the vault provider for the following modules. The original documentation can be found here
SBP Specific implementations
Here is a list of supported resources and their modifications
kv_secret_v2
Original provider: kv_secret_v2
This custom provider adds the following:
- automaticly convert data to json as input for the resource
- automaticly create random passwords if requested
old parameter | new parameter | description |
---|---|---|
data_json | data | the data field is automaticly converted to json |
lifecycle | - | default is set to ignore all changes |
additional to the above the data structure expected is in the format:
{
"key": "value",
"key2": "value2",
}
if any of the values contains the word "random" then a rendomly generated password is created of 30 characters
example:
{
"my_secret": "random"
}
will result in a random string being created as password for my_secret
terrajinja-cli example
the following is a code snipet you can used in a terrajinja-cli template file.
This created both the hashicorp vault with the name generic
, and adds a secret in it in the path application
with key admin
that contains a random password
- task: vault-mount-generic
module: vault.mount
parameters:
path: "generic"
type: "kv"
options:
version: "2"
- task: vault-application-password
module: sbp.vault.kv_secret_v2
parameters:
mount: $vault-mount-generic.path
name: "application"
data:
admin: "random"
History
0.0.1 (14-03-2024)
- First code creation
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
Built Distribution
Hashes for terrajinja-sbp-vault-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c14b74662f56b3be84483da46b2c93edc244dca9be35804f68c109e4e7c23ccd |
|
MD5 | 5fc75e2352f74445462c27bbb6e4c14f |
|
BLAKE2b-256 | aa74666294b7530fb2ee6e32d410fb31a3c2580b00734c87f8cb8f2326dc4a80 |
Hashes for terrajinja_sbp_vault-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 669f8867564575490d9b228c1dd64133b9b3eac8e5eea6cc56bcef991d6d43d2 |
|
MD5 | 04d4c5c156a37be47b77e870989fba45 |
|
BLAKE2b-256 | 777a15706779170e04ef5928830da974d7e9dea190045016314f0ea96f4223be |