Alright, I tried. I dont seem to understand how to...
# typescript
p
Alright, I tried. I dont seem to understand how to output this subnetsId. If someone can help point me in the right direction, I would greatly appreciate it. here is my code so far.
g
Which resource are you wanting to output from? Can you share more of your code?
p
sure, Im trying to output the SubnetId from the following subnet Im instantiating
g
Generally you would have a
subnet
variable on your class that you can reference from your calling code. Here's an example - https://github.com/pulumi/examples/blob/2e9e18b36a9720dd0e691f2bfe883bbfd46bd512/classic-azure-ts-aks-keda/cluster.ts#L20.
p
Ah ok so I do this as part of the constructor?
Copy code
constructor(name: string,
                args: AksClusterArgs,
                opts: pulumi.ComponentResourceOptions = {}) {
        super("examples:keda:AksCluster", name, args, opts);
g
You would assign them within the constructor like this. A complete example is here - https://gist.github.com/clstokes/01260b82dca3240c5d4b6207870f2d96.