Feature request
Please add native support for generating reports directly from an HCP Terraform run ID, without requiring users to manually download plan JSON first.
Motivation
Today, using tfplan2md with HCP Terraform workflows typically requires extra scripting to:
- Call HCP/TFC APIs
- Locate the plan artifact for a run
- Download and pass JSON to
tfplan2md
A first-class HCP input path would simplify this dramatically for CI pipelines and local troubleshooting.
Proposed UX
Add a CLI option:
tfplan2md --hcp-run-id <run-id> --output report.md
Auth / endpoint configuration
TFE_TOKEN (required)
TFE_ADDRESS (optional, default https://app.terraform.io)
Input rules
--hcp-run-id should be mutually exclusive with positional plan-file input and explicit stdin input.
- If
--hcp-run-id is provided, it should be treated as the selected input source.
Expected behavior
Given a valid run ID and token, tfplan2md should:
- Resolve the run in HCP Terraform
- Retrieve the associated plan JSON (or equivalent payload needed for current render pipeline)
- Produce standard markdown output identical in structure to existing local JSON input behavior
Error handling expectations
Clear, actionable errors for:
- missing
TFE_TOKEN
- invalid/nonexistent run ID
- non-success HTTP responses (401/403/404/5xx)
- malformed or unexpected API payloads
- connectivity/timeouts
Why this would help
This would make tfplan2md much easier to adopt in real HCP Terraform environments by removing custom glue code and making run-based report generation a one-command workflow.
Feature request
Please add native support for generating reports directly from an HCP Terraform run ID, without requiring users to manually download plan JSON first.
Motivation
Today, using
tfplan2mdwith HCP Terraform workflows typically requires extra scripting to:tfplan2mdA first-class HCP input path would simplify this dramatically for CI pipelines and local troubleshooting.
Proposed UX
Add a CLI option:
Auth / endpoint configuration
TFE_TOKEN(required)TFE_ADDRESS(optional, defaulthttps://app.terraform.io)Input rules
--hcp-run-idshould be mutually exclusive with positional plan-file input and explicit stdin input.--hcp-run-idis provided, it should be treated as the selected input source.Expected behavior
Given a valid run ID and token,
tfplan2mdshould:Error handling expectations
Clear, actionable errors for:
TFE_TOKENWhy this would help
This would make
tfplan2mdmuch easier to adopt in real HCP Terraform environments by removing custom glue code and making run-based report generation a one-command workflow.