Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Generate a jinja2 template automatically from the values of a retrieved key #66

@nir0s

Description

@nir0s

Assume a template boto.ini:

[Credentials]
aws_access_key_id = {{ access }}
aws_secret_access_key = {{ secret }}

and a key:

Description:   None
Uid:           08ee6102-5668-440f-b583-97a1c7a17e5a
Created_At:    2016-09-15 15:10:01
Metadata:      None
Modified_At:   2016-09-15 15:10:01
Value:         access=my_access;secret=my_secret;
Name:          aws

It would be nice to generate a file automatically using the values of that key like so:

ghost get aws --generate boto.ini

and get

[Credentials]
aws_access_key_id = my_access
aws_secret_access_key = my_secret

This will allow a user to never keep files with credentials within them, but rather templates of files only.
Of course, you can always provide the file's data as the value to encrypt, but if the file is big or if it frequently changes, it's less comfortable.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions