Skip to content

When checking module registry credentials .tofurc is ignored #4985

@rlees85

Description

@rlees85

Describe the bug

When checking module registry credentials .tofurc is ignored however .terraformrc is not. Obviously this is a small bug with a very simple workaround but I am raising it as Terragrunt would appear to be backing OpenTofu.

Workaround:

Configure .terraformrc instead.

Steps To Reproduce

  • Have a private Terraform module registry (unfortunately this is not straightforward but if you have a Gitlab account you are in luck!)
  • Configure your .tofurc file with the registry's access token
  • Terragrunt is unable to pull the module.

Expected behavior

For Terragrunt to be able to download the module given the token provided in .tofurc.

Must haves

  • Steps for reproduction provided.

Nice to haves

  • Terminal output
  • Screenshots

Versions

  • Terragrunt version: 0.90.0
  • OpenTofu/Terraform version: 1.10.6 (not relevant, doesn't get as far as invoking Tofu)
  • Environment details (Ubuntu 20.04, Windows 10, etc.): Archlinux

Additional context

I believe the problem lies in this file: https://github.com/gruntwork-io/terragrunt/blob/main/tf/cliconfig/user_config.go
Due to this dependency: github.com/hashicorp/terraform/command/cliconfig

This may be an easy fix as long as https://github.com/opentofu/opentofu/tree/main/internal/command/cliconfig is available as a Go package.

I may pick this up in my own time but I am just raising the issue for now so it can at least be tracked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpreservedPreserved issues never go stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions