TerraformVariable
TerraformVariable allows you to define inputs for your stack. These can be provided via CLI arguments, environment variables, or terraform.tfvars files.
Configuration
A variable can have several properties:type: The data type (string, number, bool, list, map, etc.).default: A default value if none is provided.description: Documentation for the variable.sensitive: If true, the value is masked in CLI output.nullable: Whether the variable can be null.validation: Custom validation rules.
Usage
To use a variable’s value, you access its typed properties:value, stringValue, numberValue, booleanValue, or listValue.
TerraformOutput
TerraformOutput is used to export information from your stack. This is useful for sharing data between stacks or displaying important information (like an IP address) after deployment.
TerraformLocal
TerraformLocal (or “Locals”) allows you to assign a name to an expression. This is useful for avoiding repetition and simplifying complex logic.
asString, asNumber, asBoolean, and asList.