Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Automatically create cluster if ClusterNotFoundException #50

Open
gsvitak opened this issue Apr 18, 2018 · 1 comment
Open

Automatically create cluster if ClusterNotFoundException #50

gsvitak opened this issue Apr 18, 2018 · 1 comment

Comments

@gsvitak
Copy link

gsvitak commented Apr 18, 2018

Hello,

Thank you for the CLI. It seems super awesome so far.

Question.. Do I have to have the cluster already defined/created if I do not want to use the default Fargate cluster?

I am currently receiving ClusterNotFoundException if I do
fargate --cluster new_cluster task run long_running

Thanks
G

@amadkinnon
Copy link

I just ran into this issue. Clustername argument on the command line is ignore. Fixed the issue in cmd/root.go by only setting cluster name to default if it is not set.

This still doesn't propogate through to the logging path. But it works for me.

$ diff root.go root.go.orig

140c140
<               }
---
>                       ecs := ECS.New(sess, clusterName)
142c142
<               ecs := ECS.New(sess, clusterName)
---
>                       output.Debug("Creating default cluster [API=ecs Action=CreateCluster]")
144c144
<               output.Debug("Creating default cluster [API=ecs Action=CreateCluster]")
---
>                       arn, err := ecs.CreateCluster()
146,151c146,150
<               arn, err := ecs.CreateCluster()
<
<               if err == nil {
<                       output.Debug("Created cluster [ARN=%s]", arn)
<               } else {
<                       output.Fatal(err, "Could not create default cluster")
---
>                       if err == nil {
>                               output.Debug("Created cluster [ARN=%s]", arn)
>                       } else {
>                               output.Fatal(err, "Could not create default cluster")
>                       }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants