Support multiple clusters in configuration
The configuration file currently uses only one section (ecs).
It would be very useful if several sections could be used, one per cluster, with the ability to switch between them, e.g.:
$ cat ~/.ecs/config
[ecs]
cluster = default-cluster
aws_profile =
region = eu-west-1
aws_access_key_id = MYKEYID
aws_secret_access_key = mySecretKey
[test]
cluster = another-cluster
aws_profile =
region = us-east-1
aws_access_key_id = MYKEYID
aws_secret_access_key = mySecretKey
$ ecs-cli -c test ps
Even better would be to be able to pass the cluster name at run time like the other attributes. eg:
aws-cli --cluster another-cluster --region eu-west-1 compose create
this would be especially useful in a shared build server environment
👍
👍
👍
👍
related to https://github.com/aws/amazon-ecs-cli/issues/174
👍
Added proposals to support multiple clusters configuration. Please give us some feedback. Thanks! https://github.com/aws/amazon-ecs-cli/issues/253
Is there any traction on this? Why is this config file even a thing? Just use --profile like every other AWS command and utility?
I deal with multiple accounts. I will have to deal with multiple clusters in multiple accounts. Without this support, I'm not sure how to move forward.
@gstaples We posted a proposal earlier #251, and we are actively working on the implementation.
As for today, added --cluster and --region runtime flags for every command in our latest release. You can use AWS CLI profile and the new runtime flags to switch between accounts and clusters. Hope that helps!
Released in v1.0.0