most-judge-33290
06/13/2019, 9:56 PMwhite-balloon-205
aws.ecs.getCluster
which returns a value that is not actually a Cluster. I assume you are not using TypeScript? Pretty sure this would have been an early error in TypeScript.
@lemon-spoon-91807 what’s the easiest way to use an existing ECS cluster here?lemon-spoon-91807
06/13/2019, 10:01 PMnew awsx.ecs.Cluster("somename", { cluster })
. This will allow you to built an awsx Cluster from an aws Cluster.most-judge-33290
06/13/2019, 10:12 PMType 'Promise<GetClusterResult>' is missing the following properties from type 'Cluster': arn, name, tags, id, and 2 more.ts(2740)
cluster.d.ts(52, 5): The expected type comes from property 'cluster' which is declared here on type 'ClusterArgs'
lemon-spoon-91807
06/13/2019, 11:10 PMmost-judge-33290
06/13/2019, 11:18 PMvar tCluster = aws.ecs.Cluster.get(name ,name);
var cluster = new awsx.ecs.Cluster(name, { cluster: tCluster });
lemon-spoon-91807
06/14/2019, 1:21 AMconst result = await aws.ecs.getCluster({ clusterName: clusterName });
const underlyingCluster = aws.ecs.Cluster.get("whatever", result.id);
const cluster = new awsx.ecs.Cluster("blahblah", {
cluster: underlyingCluster,
securityGroups: [/*fill this in*/],
});
most-judge-33290
06/14/2019, 3:39 PMlemon-spoon-91807
06/14/2019, 3:39 PM