Closed RomanHotsiy closed 1 year ago
Basti could also search for a configuration file starting from the current working directory and outward. This way, teams could have a basti.json
/basti.yaml
files with connection targets defined in their repositories instead of polluting package.json
with verbose basti
commands
Also, I'm not a huge fan of editing global config files like ~/.vimrc
or ~/.pgpass
. It might make sense to wrap the global config file interaction with a Basti command. For example, basti config
I came up with a configuration format like this:
---
connect:
vault-sandbox:
target: vault-sandbox
localPort: 8201
vault-local:
target: vault-sandbox
localPort: 8200
db-main-sandbox:
target: db-main-sandbox
localPort: 5432
targets:
vault-sandbox:
customTargetVpc: vpc-11111111111111111
customTargetHost: test-1111111111111111.elb.us-east-1.amazonaws.com
customTargetPort: 8200
awsProfile: sandbox
awsRegion: us-west-1
db-main-sandbox:
rds-instance: db-main
awsProfile: sandbox
@RomanHotsiy, I would be happy to hear your thoughts on this!
Connection to the same target is repetitive right now and requires someone to carefully pick the target and use correct port.
Would be slick to have some predefined configurations set (which we can distribute to all our users) which will allow doing something like:
Behind the scenes it will pick correct region, target and local port.
The config format may be as simple as that:
You can store this config in
~/.aws/basti
for example.I know this can be achieved with cli args though so we can just share predefined commands. So maybe this is an overkill.