hi, i have a ```const cluster = aws.ecs.getCluste...
# general
t
hi, i have a
Copy code
const cluster = aws.ecs.getClusterOutput({ clusterName: infraRef.getOutput("clusterName") });
which is a
pulumi.output<aws.ecs.GetClusterResult>
How do i convert this into a
awsx.ecs.Cluster
?
o
Outputs are a core part of how Pulumi works, you should be able to get properties off of that cluster if you need them, see: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#lifting
l
Do you mean
aws.ecs.Cluster
? I cant find an awsx version. Do you have a link to the docs for it? To create a read-only Cluster from a GetClusterResult, you have to create a new Cluster using the same ID. Cluster has a static
get
method: https://www.pulumi.com/registry/packages/aws/api-docs/ecs/cluster/#look-up
If what you really want is to manage the Cluster in the normal Pulumi manner, you should import the Cluster, instead.
You can do that using the
import
opt when constructing the Cluster, or by using the import CL (https://www.pulumi.com/registry/packages/aws/api-docs/ecs/cluster/#import)