Skip to content

fix(tofu): prompt for auth on workspace subcommand#641

Open
yashpy wants to merge 1 commit into
1Password:mainfrom
yashpy:fix/tofu-workspace-subcommand
Open

fix(tofu): prompt for auth on workspace subcommand#641
yashpy wants to merge 1 commit into
1Password:mainfrom
yashpy:fix/tofu-workspace-subcommand

Conversation

@yashpy

@yashpy yashpy commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Adds workspace to the list of subcommands requiring authentication in the OpenTofu plugin (plugins/tofu/terraform.go).

Previously, running commands like tofu workspace select or tofu workspace list did not trigger credential injection.

Fixes #618

Copilot AI review requested due to automatic review settings July 24, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Ready to approve

The change is a minimal, verified parity fix with the Terraform plugin and directly addresses the reported missing NeedsAuth rule.

Note: this review does not count toward required approvals for merging.

Pull request overview

Aligns the OpenTofu plugin’s authentication triggering behavior with the Terraform plugin by ensuring tofu workspace … subcommands prompt for credential injection when appropriate (fixing #618).

Changes:

  • Added needsauth.ForCommand("workspace") to the OpenTofu plugin’s NeedsAuth rules so workspace operations trigger auth/credential injection.
File summaries
File Description
plugins/tofu/terraform.go Adds workspace to the auth-gated subcommands list, matching the Terraform plugin behavior.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Low

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

tofu plugin: workspace subcommand does not trigger credential injection

2 participants