Couple of questions regarding stack outputs and re...
# dotnet
Couple of questions regarding stack outputs and references. 1. In General, it feels like I'm not understanding something. Everything I need is sitting in the stack's state.json file already. But I have to explicitly "export" certain values (seemingly as primitive values) in order to be able to access them from another project via a stack reference? 2. Is it possible to create a stack output that is a POCO class? I can create an output<string> easily enough, but that's not a very clean approach when you would like to export related properties for each of the resources you create. For example, I'd like to have export some information about the vNet I created, including the Id, Name and subnet names.
Copy code
public class Model
  public string Id {get;set;}
  public string Name {get;set;}
  public string[] Subnets {get;set;}
I've started using MyStackOutput model instead of individual properties. There is still a single Output<string> though.
And I think using a StackReference is a way to indicate a realized dependency on a resource in another stack that the framework honors. Versus doing it via the Rest API for example.