I'm creating an AKS ManagedCluster in a stack. In ...
# general
w
I'm creating an AKS ManagedCluster in a stack. In a different stack I want to create a namespace in this cluster and use
dependsOn
to specify which cluster to create it in. I tried to use:
Copy code
const cluster = containerservice.getManagedClusterOutput({
  resourceGroupName: clusterRgName,
  resourceName: clusterName
})

const namespace = new kubernetes.core.v1.Namespace(
  "Create namespace",
  {
    metadata: { name: "my-namespace" },
  }, {
    dependsOn: [cluster] // Type 'GetManagedClusterResult' is missing the following properties from type 'Resource': urn, getProvider
  }
);
But this returns a
GetManagedClusterResult
not a
pulumi.Resource
. How would I go about fetching the actual resource in a different stack, is it possible?