hashicorp / hashicorp/terraform-exec

Support Terraform 0.14.0 and later -chdir Global Option

Open
#99 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
786
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Reference: https://github.com/hashicorp/terraform/blob/v0.14/CHANGELOG.md
Reference: https://github.com/hashicorp/terraform/pull/26087
Reference: https://github.com/hashicorp/terraform/issues/25558
Reference: https://github.com/hashicorp/terraform/issues/18030

Terraform commands have historical incompatibilities when executed outside the configuration directory, for example automatic variables files are not properly read. Terraform 0.14.0 (all pre-release versions) introduces a new `-chdir` global option, e.g. `terraform -chdir /path/to/config ` syntax. Later Terraform versions will deprecate the older `terraform /path/to/config` as an argument.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Go entry point that assembles Terraform command arguments and the existing tests for running commands outside the configuration directory. Compare current argument handling with Terraform 0.14's global -chdir syntax and verify behavior against the referenced Terraform changelog and pull request. Done means supported commands can use -chdir while existing command execution tests remain passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, terraform
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.