You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
App({ hclOutput: true }) is ignored: the stack writes JSON into cdk.tf #561
Reproduced on upstream/main by running the library directly, the same way unit tests and Testing.app() users would.
Cause
Two settings that should agree don't:
App resolves hclOutput from the config, with SYNTH_HCL_OUTPUT taking precedence (app.ts:102-108). The manifest uses that value for the file extension.
TerraformStack builds its StackSynthesizer from the env var alone (terraform-stack.ts:124-129), and that decides the file's contents.
Under the CLI, synth-stack.ts always sets SYNTH_HCL_OUTPUT from --hcl (synth-stack.ts:145). The two values match there, but the hclOutput config is always overridden, so it does nothing.
Possible Solutions
Have StackSynthesizer read the resolved App.of(stack).hclOutput at synth time instead of reading the env var in the stack constructor. Then the config, the env var and the manifest all go through the same precedence in App.
Activity
fix(lib): write HCL when App is created with hclOutput (open-construc…