Skip to content

Avoid parent-process chdir during Terraform commands#12

Merged
Prodesire merged 1 commit into
mainfrom
codex/process-backend-default
Jul 3, 2026
Merged

Avoid parent-process chdir during Terraform commands#12
Prodesire merged 1 commit into
mainfrom
codex/process-backend-default

Conversation

@Prodesire

Copy link
Copy Markdown
Owner

Summary

  • Default TerraformCommand and AsyncTerraformCommand to a process backend so Terraform internal chdir calls do not affect the parent Python process.
  • Keep current-process execution available with backend="thread", plus explicit ProcessTerraformCommand and ThreadTerraformCommand aliases.
  • Add cwd-isolation regression tests, update English/Chinese docs, and bump libterraform to 0.15.3.

Fixes #11

Validation

  • git diff --check
  • uv run ruff format --check src tests scripts
  • uv run ruff check src tests scripts
  • uv run ty check src tests scripts
  • uv run pytest --color=yes
  • make doc-build
  • uv build --wheel

Default TerraformCommand and AsyncTerraformCommand to a process backend so Terraform's internal chdir does not affect the parent Python process. Keep the current-process path available with backend="thread" and explicit ThreadTerraformCommand.

Add regression tests, update docs, and bump the patch version to 0.15.3.
@Prodesire Prodesire mentioned this pull request Jul 3, 2026
@Prodesire Prodesire merged commit b7070ad into main Jul 3, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid using chdir

1 participant