Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with nested local modules in terraform #11203

Open
1 task done
iGlasmacher-funnellab opened this issue Jan 2, 2025 · 0 comments
Open
1 task done

Problem with nested local modules in terraform #11203

iGlasmacher-funnellab opened this issue Jan 2, 2025 · 0 comments
Labels
L: terraform Terraform packages T: bug 🐞 Something isn't working

Comments

@iGlasmacher-funnellab
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

terraform

Package manager version

No response

Language version

1.10.0

Manifest location and content before the Dependabot update

No response

dependabot.yml content

No response

Updated dependency

No response

What you expected to see, versus what you actually saw

I have some local modules which are referenced in a chain, e.g. modules/global/app.tf calls a module at ../foo with each module having its own providers.

Now I want to upgrade the provider, but not the provider.tf files are updated.
They have the following form

terraform {
  required_version = ">= 1.7.3"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.82.2"
    }
  }
}

Now on terraform providers lock [...] in the Dependabot workflow, there is the error

│ Error: Could not retrieve providers for locking
│ 
│ Terraform failed to fetch the requested providers for linux_amd64 in order to
│ calculate their checksums: some providers could not be installed:
│ - registry.terraform.io/hashicorp/aws: locked provider
│ registry.terraform.io/hashicorp/aws 5.75.1 does not match configured version
│ constraint >= 4.40.0, >= 5.46.0, 5.75.1, 5.82.2; must use terraform init
│ -upgrade to allow selection of new versions.

This is because the 5.75.1 constraint was not replaced by the 5.82.2 constraint in every modules provider.tf.

If the modules are not chained (a local module includes another local module), everything works just fine and all the providers of the top level included modules are updated correctly.

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

No response

Smallest manifest that reproduces the issue

No response

@iGlasmacher-funnellab iGlasmacher-funnellab added the T: bug 🐞 Something isn't working label Jan 2, 2025
@github-actions github-actions bot added the L: terraform Terraform packages label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: terraform Terraform packages T: bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant