quintilesims / layer0

Build, Manage, and Deploy Your Applications
Apache License 2.0
44 stars 20 forks source link

`l0-setup endpoint -d -i` does not export the `LAYER0_AWS_REGION` env var #541

Closed tlake closed 6 years ago

tlake commented 6 years ago

Expected behavior

Setting the environment variables from l0-setup endpoint -d -i should give a user(/developer) everything they need to run Layer0.

Actual behavior

Attempting to run the API locally for a cluster not created in the default us-west-2 fails, because l0-setup doesn't export the LAYER0_AWS_REGION variable, and it must be set manually for clusters in other regions (for example, when I'm trying to test Fargate things in us-east-1). It's an easy enough workaround to manually export the var, but still not desired behavior.

cd $layer0dir/api && go run -v main.go -debug

2018/02/05 13:08:12 [DEBUG] Adding API tags
2018/02/05 13:08:13 ClusterNotFoundException: Cluster not found.
        status code: 400, request id: 4496be12-0ab8-11e8-8961-4d5bc4863735
exit status 1

Steps to reproduce the behavior

Try running the API locally using the vars from l0-setup endpoint -d -i with the current state of api-refactor (or 500-launch-type-for-services-and-tasks in my case, which is based off of api-refactor).