feat: add workspace + terraform cloud config to GenericOptions#82
Merged
Conversation
Add two typed, caller-sourced fields to GenericOptions: - workspace (20): the terraform CLI workspace to select. Read outside the plugin too (cost output / provider input), so it is typed rather than in the raw_options blob. - terraform_cloud_configuration (21): a new TerraformCloudConfiguration message (organization/workspace/hostname) identifying the TFC/E remote workspace. Typed (not the blob) because it is caller-sourced and the hostname is also read by the caller to pair with the token in a credential_set (the plugin matches hostname to a credential_set host, then uses organization+workspace to address the remote workspace). Its workspace is the TFC remote workspace, distinct from field 20. Regenerated Go and TS bindings.
liamcervante
force-pushed
the
generic-options-workspace
branch
from
July 13, 2026 11:39
6a315f1 to
cd2bda4
Compare
liamg
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two typed, caller-sourced fields to
GenericOptionsfor terraform-family parse options that must not live in the opaqueraw_optionsblob because they're also read outside the plugin.workspace(20) — the terraform CLI workspace to select. Also read outside the plugin (the project's workspace in the cost output / provider input, the runner's cache key + metadata), so it travels typed.terraform_cloud_configuration(21) — newTerraformCloudConfigurationmessage (organization/workspace/hostname) identifying the TFC/E remote workspace. Typed because it's caller-sourced and the hostname is the key the plugin uses to pair this config with its auth token (aCredentialSetmatched by host);organization+workspacethen address the remote workspace. Itsworkspaceis the TFC remote workspace, distinct from field 20.Changes
options.proto:string workspace = 20;andTerraformCloudConfiguration terraform_cloud_configuration = 21;onGenericOptions, plus the new message.make generatepasses: buf lint/format/generate,go build ./gen/go/..., tsc).Follow-ups (separate PRs)
GenericOptions; neither is in the blob.terraform.workspace/terraform.cloud.*as top-level typed fields (not folded into the blob).CredentialSet(host+token).