sparse-intern-71089
06/13/2019, 9:56 PMwhite-balloon-205
white-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 PMlemon-spoon-91807
06/13/2019, 10:02 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 PMmost-judge-33290
06/13/2019, 10:21 PMmost-judge-33290
06/13/2019, 11:09 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'
most-judge-33290
06/13/2019, 11:09 PMlemon-spoon-91807
06/13/2019, 11:10 PMlemon-spoon-91807
06/13/2019, 11:11 PMlemon-spoon-91807
06/13/2019, 11:11 PMlemon-spoon-91807
06/13/2019, 11:11 PMlemon-spoon-91807
06/13/2019, 11:12 PMmost-judge-33290
06/13/2019, 11:18 PMmost-judge-33290
06/13/2019, 11:19 PMvar tCluster = aws.ecs.Cluster.get(name ,name);
most-judge-33290
06/13/2019, 11:19 PMvar cluster = new awsx.ecs.Cluster(name, { cluster: tCluster });
most-judge-33290
06/13/2019, 11:24 PMlemon-spoon-91807
06/14/2019, 1:21 AMlemon-spoon-91807
06/14/2019, 1:22 AMlemon-spoon-91807
06/14/2019, 1:24 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 PMlemon-spoon-91807
06/14/2019, 3:39 PM