Skip to main content

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

sbp.vault.kv_secret_v2

Original provider: vault.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 only if random passwords are used

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

terraform:
  resources:
    - 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

terrajinja-sbp-vault-0.2.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terrajinja_sbp_vault-0.2.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file terrajinja-sbp-vault-0.2.1.tar.gz.

File metadata

  • Download URL: terrajinja-sbp-vault-0.2.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for terrajinja-sbp-vault-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1607e766b789bbca27939d2ae3d6264060e0c9e5f0f0b49176f64e2dfb3a88f4
MD5 887fa14950b160fc3878f49855542256
BLAKE2b-256 d353eafc59de685b67d8450d0315f2b7b810e48bfe45c4d3d4e545ad6c3f6973

See more details on using hashes here.

File details

Details for the file terrajinja_sbp_vault-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for terrajinja_sbp_vault-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aebe0326ee011ac52678e9c6b78969dc94e76530c191d00273ff2fc062e24773
MD5 75606cfa7b17136adbfe65c6b252a66f
BLAKE2b-256 035fe0eca319209a7eed12614ae4e3319f8a2386c260de0d673d5b9fe18e6342

See more details on using hashes here.

Supported by

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