Skip to content

fix: stop provisioning cspell config - #162

Merged
thomasgarrison merged 2 commits into
mainfrom
vector/stop-provisioning-cspell-config
Jun 11, 2026
Merged

fix: stop provisioning cspell config#162
thomasgarrison merged 2 commits into
mainfrom
vector/stop-provisioning-cspell-config

Conversation

@vector-arrow

@vector-arrow vector-arrow commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Stop pushing the shared .cspell.config.yaml template into managed repositories on every sync, so individual repos can own their cspell config and repo-specific ignorePaths.

Instead of unmanaging the file entirely, this introduces a seeded files mechanism in the github-repository module (seeded_repository_files): the file is created with the template content when a repository is first provisioned, but lifecycle.ignore_changes prevents Terraform from ever updating it afterwards. New repositories still get a working starting config; existing repositories keep their local changes.

Context

The June 7 Terraform sync overwrote repo-specific cspell configs with the shared template in at least:

  • Arrow-air/project-quiver: removed the KiCad/STEP binary-file ignores added in PR #219, causing ~39k spelling errors once CI ran later.
  • Arrow-air/website: removed repo-specific ignores such as static, package-lock.json, and docs/project-quiver, leaving staging latently red.

Because the bot commits include [skip ci], these failures did not surface at sync time.

Migration

Handled in-config by a moved block in the module: every existing github_repository_file.files[".cspell.config.yaml"] instance is renamed in state to github_repository_file.seeded_files[".cspell.config.yaml"] at plan time. No manual terraform state rm is required and no files are deleted from managed repositories.

The plan should show all 23 instances as moved, with no destroys. (An unrelated github_branch_protection.all create for project-longshot is expected — pre-existing drift that any apply would pick up.)

Follow-up (not in this PR)

project-quiver and website currently contain the clobbered template version of the config; their repo-specific ignore paths need to be restored in those repos once this merges.

Validation

  • terraform fmt -check -recursive: clean
  • terraform validate (1.4.5 in Docker): valid

@vector-arrow
vector-arrow requested a review from a team as a code owner June 11, 2026 02:59
@cla-bot cla-bot Bot added the cla-signed label Jun 11, 2026
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Validation Output
Success! The configuration is valid.


Terraform Plan 📖success

Show Plan
terraform

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.repository["HearHear"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["HearHear"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "HearHear/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["HearHear-Webapp"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["HearHear-Webapp"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "HearHear-Webapp/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["arrow-catalog"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["arrow-catalog"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "arrow-catalog/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["arrow-store"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["arrow-store"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "arrow-store/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["cla-bot"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["cla-bot"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "cla-bot/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["clabot-config"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["clabot-config"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "clabot-config/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["dao-aips"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["dao-aips"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "dao-aips/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["dao-gbc"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["dao-gbc"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "dao-gbc/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["dao-governance"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["dao-governance"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "dao-governance/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["tools"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["tools"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "tools/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository["website"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository["website"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "website/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_emb_template["stm32"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_emb_template["stm32"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "embedded-template-stm32/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod["caribou"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod["caribou"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "project-caribou/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod["feather"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod["feather"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "project-feather/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod["flight-tracking"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod["flight-tracking"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "project-flight-tracking/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod["longshot"].github_branch_protection.all["**/**"] will be created
  + resource "github_branch_protection" "all" {
      + allows_deletions                = true
      + allows_force_pushes             = true
      + blocks_creations                = false
      + enforce_admins                  = true
      + id                              = (known after apply)
      + lock_branch                     = false
      + pattern                         = "**/**"
      + repository_id                   = "project-longshot"
      + require_conversation_resolution = false
      + require_signed_commits          = true
      + required_linear_history         = false
    }

  # module.repository_pod["longshot"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod["longshot"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "project-longshot/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod["quiver"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod["quiver"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "project-quiver/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod["spearhead"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod["spearhead"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "project-spearhead/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_pod_template["project"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_pod_template["project"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "pod-template-project/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_tf["github"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_tf["github"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "tf-github/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_tf["onboarding"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_tf["onboarding"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "tf-onboarding/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_tf_gcp["organization"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_tf_gcp["organization"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "tf-gcp-organization/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

  # module.repository_tf_mod["google-automation-setup"].github_repository_file.files[".cspell.config.yaml"] has moved to module.repository_tf_mod["google-automation-setup"].github_repository_file.seeded_files[".cspell.config.yaml"]
    resource "github_repository_file" "seeded_files" {
        id                  = "terraform-google-automation-setup/.cspell.config.yaml"
        # (9 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Pusher: @thomasgarrison, Action: pull_request, Working Directory: ``, Workflow: Terraform

Move .cspell.config.yaml to a new seeded_repository_files mechanism:
the file is created with template content when a repository is first
provisioned, but ignored afterwards so each repository owns its own
cspell configuration.

The included moved block migrates all existing instances in state, so
no manual 'terraform state rm' is needed and no files are deleted from
managed repositories.
@thomasgarrison
thomasgarrison merged commit 25d9e9b into main Jun 11, 2026
5 checks passed
@thomasgarrison
thomasgarrison deleted the vector/stop-provisioning-cspell-config branch June 11, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants