sparse-intern-71089
07/14/2022, 9:34 AMancient-car-89914
07/14/2022, 2:03 PMancient-car-89914
07/14/2022, 2:04 PMexport const cluster = fargateCluster.arn should workagreeable-window-77899
07/14/2022, 2:50 PMcluster argument which is part of the awsx.ecs.FargateService is looking for a value of type awsx.ecs.Cluster and thus the arn value is not being accepted. I guess your suggestion will work with the classic aws api aws.ecs.Service since it is only looking for string for the cluster argument.ancient-car-89914
07/14/2022, 2:55 PMagreeable-window-77899
07/14/2022, 3:35 PMawsx.ecs to fetch the cluster which returns the type of awsx.ecs.Cluster 😢
Will probably have to create the service using aws.ecs.Service i guessclever-sunset-76585
07/14/2022, 3:38 PMname instead.
I am assuming you are using AWSX 0.x ? In that, the awsx.ecs.Cluster accepts a cluster arg which can either be an aws.ecs.Cluster or an Input<string> (the existing cluster's name): https://github.com/pulumi/pulumi-awsx/blob/066dcd47e78198a9a56ea36a38b4615ac50c747e/awsx-classic/ecs/cluster.ts#L176. So use the name from your other stack to "re-create" the Cluster resource. Note that when you do this, you are essentially bringing the cluster resource into this stack's state. This is because AWSX does a .get() when you pass the name thereby bringing the cluster into the state. So it's sort of undoing the separation that you are likely looking to have.clever-sunset-76585
07/14/2022, 3:42 PM1.x-beta which is based on the native AWS provider. There it seems the FargateService itself has a cluster arg that simply seems to accept a string value which I am assuming is either the name or the ARN of the cluster. https://github.com/pulumi/pulumi-awsx/blob/master/awsx/schema-types.ts#L205agreeable-window-77899
07/14/2022, 4:20 PMagreeable-window-77899
07/18/2022, 8:55 AM1.x-beta package but found out that the API have changed significantly there and it was breaking a lot of other stuff. So I did not go with that option.
Thus I finally created a default VPC and let the awsx.ecs.FargateService create a default cluster on the default VPC so that the cluster is auto created and i don't have to manage that separately and pass around the value for deployments.agreeable-window-77899
07/18/2022, 2:53 PMdefault cluster per stack. Thus I finally ended up with create a new Fargate cluster per stack and decided not to share a single cluster across stacks.