Skip to content

Support version pinning for terraform-docs in the Terraform feature - #1698

Open
Kaniska244 with Copilot wants to merge 2 commits into
mainfrom
copilot/add-terraform-docs-version-input
Open

Support version pinning for terraform-docs in the Terraform feature#1698
Kaniska244 with Copilot wants to merge 2 commits into
mainfrom
copilot/add-terraform-docs-version-input

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

terraform-docs could only be toggled on/off via installTerraformDocs, always installing latest. This left builds exposed to breaking changes across releases (e.g. v0.22.0's altered table delimiter formatting). This adds a version pin.

Changes

  • New option terraformDocsVersion (string, default latest) in devcontainer-feature.json. Resolution flows through the existing find_version_from_git_tags, so latest and specific versions both work.
  • install.sh: reads TERRAFORMDOCSVERSION into TERRAFORM_DOCS_VERSION, replacing the hardcoded latest. The value is only consumed inside the installTerraformDocs block, so it has no effect unless that flag is set.
  • Tests: added install_terraform_docs_version scenario + test asserting a pinned 0.20.0 install.
  • Version bump: 1.4.51.5.0; README options table updated.

Usage

"features": {
    "ghcr.io/devcontainers/features/terraform:1": {
        "installTerraformDocs": true,
        "terraformDocsVersion": "0.20.0"
    }
}

Copilot AI changed the title [WIP] Add version input for terraform-docs installation Support version pinning for terraform-docs in the Terraform feature Jul 29, 2026
Copilot AI requested a review from Kaniska244 July 29, 2026 09:41
@Kaniska244
Kaniska244 marked this pull request as ready for review July 29, 2026 10:28
@Kaniska244
Kaniska244 requested a review from a team as a code owner July 29, 2026 10:28
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.

Support version pinning for terraform-docs in the Terraform feature

2 participants