A Terraform variable file assigns values to input variables for a Terraform configuration. In a reusable pipeline, it supplies environment-specific or runtime-generated values without changing the shared job definition. section 6.3.7
Use variable files to keep shared Terraform pipeline jobs adaptable:
- Pass the file to terraform plan with the optional -var-file argument. section 6.3.7
- Generate or populate the file after checkout when values depend on computations performed by the pipeline. section 6.3.7
- Expose the file path as a shared-job parameter so callers can use the strategy without modifying shared pipeline code. section 6.3.7
Runtime-generated plan inputs
A CircleCI Terraform plan job can run custom after-checkout steps that compute values and create a local variable file, then invoke terraform plan with -var-file pointing to it. section 6.3.7

