thousands-art-36850
06/14/2021, 2:30 PMaws.ecs.Cluster
is not compatible with what’s required when creating an ECS FargateService awsx.ecs.Cluster
. Any suggestions / guidance would be appreciated, thanks in advance! (more details in 🧵 )const cluster = new awsx.ecs.Cluster(...);
export const clusterId = cluster.id;
brave-planet-10645
06/14/2021, 2:35 PMthousands-art-36850
06/14/2021, 2:39 PMStackReference
. This is how I’m importing the id and trying to create an ECS FargateService:
const services = new pulumi.StackReference("stack");
const clusterId = services.getOutput("clusterId");
const cluster = aws.ecs.Cluster.get("name", clusterId);
const server = new awsx.ecs.FargateService("resourceName", {
cluster, // This doesn't work
});
aws.ecs.Cluster
is not compatible with awsx.ecs.Cluster
brave-planet-10645
06/14/2021, 2:40 PMthousands-art-36850
06/14/2021, 2:49 PMawsx.ec2.Vpc
fromExistingIds that returns Vpc
of type AWSX, but couldn’t find something similar for the clusterbrave-planet-10645
06/14/2021, 3:42 PMdo I need to switch to using the AWS core package in this case?Sorry to say this, but "it depends". There are some cases where it's going to be fine to use AWSX - like if you're using it all within the same stack, if you're not building anything particularly complicated etc and if you can stay within the resources that the package provides.
thousands-art-36850
06/14/2021, 4:14 PMagreeable-restaurant-12233
06/14/2021, 5:51 PMthousands-art-36850
06/15/2021, 6:41 AMbrave-planet-10645
06/15/2021, 7:13 AMthousands-art-36850
06/15/2021, 10:54 AMconst cluster = aws.ecs.Cluster.get(`${stackName}-cluster`, config.appClusterId);
const appCluster: awsx.ecs.Cluster;
appCluster.id = cluster.id;
brave-planet-10645
06/15/2021, 11:40 AMconst cluster = aws.ecs.Cluster.get(`${stackName}-cluster`, config.appClusterId);
let appCluster = {
id: cluster.id
...
}
It's the shape that's important (or at least that's my understanding)thousands-art-36850
06/15/2021, 1:10 PMbrave-planet-10645
06/15/2021, 1:13 PM