Skip to content

chore(terraform): remove committed plan binary tfplan.lt and gitignore tfplan* #1098

Closed

Description

@cristim

What

Commit `afea1b7fa` accidentally committed a binary Terraform plan file at
`terraform/environments/aws/ci-cd-permissions/tfplan.lt` (26,944 bytes).

Why this is a problem

Terraform plan files are build artifacts that:

  • Can contain sensitive resource details and state information
  • Are environment-specific and machine-generated
  • Must never be committed to version control

Root cause

The existing `.gitignore` had `tfplan` (exact name) and `.tfplan` (suffix match)
but was missing `tfplan.
`, so `tfplan.lt` slipped through undetected.

Fix

Two parts:

  1. Add `tfplan.` and `.tfplan.*` patterns to both the root `.gitignore` and
    `terraform/.gitignore` to prevent recurrence.
  2. Remove the committed binary from any branch carrying `afea1b7fa` before it merges.

gitignore rules added

```

In .gitignore and terraform/.gitignore

tfplan.*
.tfplan.
```

After the fix, `git check-ignore -v terraform/environments/aws/ci-cd-permissions/tfplan.lt`
correctly matches `terraform/.gitignore:37:tfplan.*`.

Activity

  1. added
    triagedItem has been triaged
    priority/p3Polish / idea / may never ship
    effort/xsTrivial / one-liner
    type/choreMaintenance / non-user-visible
    pr-createdA PR has been opened for this issue (dedup guard for the auto-PR loop)
    pr-mergedThe PR for this issue has been merged
    on Jun 7, 2026
  2. cristim commented on Jul 27, 2026

    @cristim
    MemberAuthor

    Verification sweep against main (101f099fb) on 2026-07-27 finds this already resolved.
    tfplan.* and .tfplan. are gitignored and tfplan.lt is not tracked.
    Evidence: commit 671bd06 (PR #1099); .gitignore.
    Recommending close.

  3. cristim commented on Sep 2, 2026

    @cristim
    MemberAuthor

    Verified resolved at 3c0f8ac: no tfplan binary is tracked and both ignore files block tfplan.* and *.tfplan.*. Evidence: .gitignore:114-117 and terraform/.gitignore:36-39 (#1099, commit 671bd06). Residual axes checked: git ls-files shows no tfplan* path anywhere in the tree. Closing as completed; reopen if the behaviour recurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/xsTrivial / one-linerimpact/internalTeam-internal onlypr-createdA PR has been opened for this issue (dedup guard for the auto-PR loop)pr-mergedThe PR for this issue has been mergedpriority/p3Polish / idea / may never shipseverity/lowMinor harmtriagedItem has been triagedtype/choreMaintenance / non-user-visibleurgency/eventuallyNo deadline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions