docs(iacm): document PLUGIN_ plan flag overrides and TF_CLI_ARGS_plan no-op#11869
Open
dtsong-harness wants to merge 1 commit into
Open
docs(iacm): document PLUGIN_ plan flag overrides and TF_CLI_ARGS_plan no-op#11869dtsong-harness wants to merge 1 commit into
dtsong-harness wants to merge 1 commit into
Conversation
… no-op The plan step's CLI flags (refresh, lock, target, replace, etc.) are controlled by PLUGIN_ prefixed environment variables, not the standard TF_CLI_ARGS_plan convention. This was previously undocumented, leading customers to set TF_CLI_ARGS_plan expecting it to work like TF_CLI_ARGS_fmt does for fmt; it is silently ignored instead.
|
Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6a599830f0bcdf4b33c32a04--harness-developer.netlify.app |
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.
What was unclear
The IaCM
planstep's OpenTofu/Terraform CLI flags (-refresh,-lock,-target,-replace, etc.) are controlled byPLUGIN_prefixed environment variables, but this was undocumented on the Tofu/Terraform Plugin Commands page. The page already documentsTF_CLI_ARGS_fmtas a supported override for thefmtcommand, which reasonably leads readers to expect the analogousTF_CLI_ARGS_planto work the same way forplan. It does not: theplanstep never readsTF_CLI_ARGS_plan(or anyTF_CLI_ARGS_*other thanTF_CLI_ARGS_fmt), and silently ignores it rather than erroring.What this adds
PLUGIN_*environment variables that map toplanCLI flags (PLUGIN_PLAN_REFRESH,PLUGIN_LOCK,PLUGIN_PLAN_TARGET,PLUGIN_PLAN_REPLACE, etc.), with defaults and descriptions.TF_CLI_ARGS_planhas no effect on this step, and pointing to the correctPLUGIN_variable instead.Evidence
Surfaced from a customer support investigation where
TF_CLI_ARGS_plan=-refresh=falsewas set at the workspace level and silently ignored, and the resulting forced refresh caused a large plan to time out. This is a repeat of an earlier support ticket on the same account; the correct variable (PLUGIN_PLAN_REFRESH) had only ever been shared with the customer via a support ticket comment, never published here. This PR folds that into the public doc so the fix is self-serve.🤖 Generated with Claude Code