This tool allows you to quickly and easily create app.yaml
You configure your App Engine app's settings in the app.yaml file. Sometimes we need to configure sensitive env_variables and they should not be in the same repository as a code base. This tool allows you to grab secrets from Hashicorp Vault
Tool is based on package text/template
, based on this you should understand the basics
of this package
We support variables, pipelines with if-else and loops with range.
app_engine_template [-source=PATH] [-dest=PATH] [-exta_vars=PATH]
-source = PATH
The path of source template from which we need to create
- github.com/sirupsen/logrus - our loggin based on this package
- github.com/hashicorp/vault/api - Hashicorp Vault official library
- gopkg.in/yaml.v2 - Marshal/Unmarshal of yaml files
You can easily add your own functions, which should help you with your issues.
Just write function and add mapping into
fmap := template.FuncMap{ "hashiVault": HashiVault, }
You can easily grab any field from Hashicorp Vault
{{ "secret/customers/databases/example-com.password" | hashiVault }}
Argument is search string
and after dot is required field name
and function name should be after pipe.
Nothing special to build. Like any tool on Go language
GOOS=windows GOARCH=386 go build -o app_engine_template.exe
GOOS=windows GOARCH=amd64 go build -o app_engine_template64.exe
GOOS=linux GOARCH=amd64 go build -o app_engine_template
GOOS=darwin GOARCH=amd64 go build -o app_engine_template
Put the binary to /usr/local/bin
on *nix based machines. This will allow you to run
it anywhere (based on your $PATH variables)
- Add auto-scaling parameters
- We need to add ability to qualify your App Engine configuration
- Simplify the template. Maybe we will migrate to any other method to work with templates.