-
Notifications
You must be signed in to change notification settings - Fork 485
Open
Labels
Description
Expected Behavior
I expect class variables on my stack to be turned into outputs.
Actual Behavior
The class variables are not turned into outputs.
Steps to Reproduce
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).
Versions
❯❯❯ npx cdktf debug
cdktf debug
language: typescript
cdktf-cli: 0.20.12
node: v24.0.1
cdktf: 0.20.12
constructs: 10.3.0
jsii: null
terraform: 1.11.4
arch: arm64
os: darwin 24.6.0
providers
aws@~> 5.61 (LOCAL)
terraform provider version: 5.100.0
kubernetes@ ~> 2.31.0 (LOCAL)
terraform provider version: 2.31.0
http@ ~> 2.1.0 (LOCAL)
terraform provider version: 2.1.0
tls@ ~> 4.0.5 (LOCAL)
terraform provider version: 4.0.6
random@ ~> 3.1.0 (LOCAL)
terraform provider version: 3.1.3
gavinbunney/kubectl@~> 1.14.0 (LOCAL)
terraform provider version: 1.14.0
DopplerHQ/[email protected] (LOCAL)
terraform provider version: 1.1.6
helm@ ~> 2.17.0 (LOCAL)
terraform provider version: 2.17.0
@cdktf/provider-aws (PREBUILT)
terraform provider version: 5.61.0
prebuilt provider version: 19.29.0
cdktf version: ^0.20.0
@cdktf/provider-kubernetes (PREBUILT)
terraform provider version: 2.31.0
prebuilt provider version: 11.6.0
cdktf version: ^0.20.0
Providers
❯❯❯ npx cdktf provider list
┌─────────────────────┬──────────────────┬─────────┬────────────┬────────────────────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ aws │ 5.100.0 │ │ ~> 5.61 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ kubernetes │ 2.31.0 │ │ ~> 2.31.0 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ http │ 2.1.0 │ │ ~> 2.1.0 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ tls │ 4.0.6 │ │ ~> 4.0.5 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ random │ 3.1.3 │ │ ~> 3.1.0 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ gavinbunney/kubectl │ 1.14.0 │ │ ~> 1.14.0 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ DopplerHQ/doppler │ 1.1.6 │ │ 1.1.6 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ helm │ 2.17.0 │ │ ~> 2.17.0 │ │ │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ aws │ 5.61.0 │ ^0.20.0 │ │ @cdktf/provider-aws │ 19.29.0 │
├─────────────────────┼──────────────────┼─────────┼────────────┼────────────────────────────┼─────────────────┤
│ kubernetes │ 2.31.0 │ ^0.20.0 │ │ @cdktf/provider-kubernetes │ 11.6.0 │
└─────────────────────┴──────────────────┴─────────┴────────────┴────────────────────────────┴─────────────────┘
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
- I'm interested in contributing a fix myself
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment