Skip to main content

Allow registering module with spacelift registry without tf in the root dir

If you try to register a module GitHub repo that doesn’t have terraform in the root, you get the following error.

Workaround
Problem
Status: ⬆️ Gathering votes3 comments

Log in to comment and vote

Comments3

  • Black Breeze

    •

    May 8, 2025

    Appreciate you sharing this, but I want to pause here and make sure we’re solving a real problem—not just reflecting an internal pattern.

    From your screenshot, this module has no Terraform code, which raises a core question:

    What is the point of having that module in the first place? A more common pattern would be to turn it into multiple modules, so that you get each one parsed accordingly, with well-documented inputs, resources and outputs.

    I’d love to understand what is currently stopping you from taking the common approach, for which we designed our module authoring experience.

    • Gold Pear

      •

      May 12, 2025

      It’s a git repo with only submodules in the “/modules” directory. For example, let’s say we wanted to group related modules under the same repo but they don’t have a common base module to use. In this situation there wouldn’t be any terraform in the root of the git repo.

    • Gold Pear

      •

      May 12, 2025

      Forgot to mention that this is supported by the Hashi Terraform Registry