Usage
Description
Theoutput command shows the values of TerraformOutput resources defined in your stack after deployment.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Display stack outputs
npx tfts output [stack] [options]
output command shows the values of TerraformOutput resources defined in your stack after deployment.
| Option | Type | Description | Default |
|---|---|---|---|
--app | string | Command to run the tfts app | From cdktf.json |
--output | string | Output directory | cdktf.out |
--skipSynth | boolean | Skip synthesis step | false |
--json | boolean | Output in JSON format | false |
npx tfts output
npx tfts output production
npx tfts output --json
npx tfts output --skipSynth
instance_ip = "10.128.0.2"
bucket_name = "my-bucket-abc123"
{
"instance_ip": {
"value": "10.128.0.2",
"type": "string"
},
"bucket_name": {
"value": "my-bucket-abc123",
"type": "string"
}
}
# Get a specific output value
INSTANCE_IP=$(npx tfts output --json | jq -r '.instance_ip.value')
echo "Instance IP: $INSTANCE_IP"
new TerraformOutput(this, "instance-ip", {
value: instance.networkInterface.get(0).networkIp,
description: "The internal IP of the instance",
});
new TerraformOutput(this, "secret", {
value: secret.value,
sensitive: true, // Hidden in logs
});