Cross stack outputs not automatically made

I have a stack like the following

class MyStack extends TerraformStack {
  public readonly eksCluster: EksCluster;
  public readonly oidcProvider: IamOpenidConnectProvider;
  public readonly clusterVpc: Vpc;
  public readonly graphNodeCluster: GraphNodeCluster;
  public readonly goldskyApiDbName: string;
  public readonly goldskyApiDbString: string;
  public readonly apiShardDbs: Record<string, string>;
  public readonly ipfsNode: IpfsNode;
  public readonly goldskyApi: GoldskyApi;
  public readonly workflowWorkerDopplerSecretCrd: DopplerSecretCrd;

  constructor(scope: Construct, name: string) {
  ...
  }
}

I’m just starting to migrate from a single stack to multiple stacks. I started by just exposing my EksCluster which successfully resulted in terraform automatically creating outputs.

I now added all of the other public variables seen above and none of them are being turned into outputs when I run a deploy command even though I properly assign them to constructs and/or plain variables (like the string ones).

Outputs are only automatically created when another stack references the value. It’s not based on the existence of a field/property.

You can manually create a TerraformOutput if you’d like a value exposed for other reasons.