Skip to content

Failed to download module after removal of 5.21.1 #1206

@rhysmcn

Description

@rhysmcn

Description

Follow on from #1203 (comment)

It seems that there is some cache or likewise that is preventing us from downloading the latest version of the module in version 5.x

Currently, we fetch the module like version = "~> 5.0", however for some reason it still tries to reference the version 5.21.1. On our side, we build of infra via pipelines so there is a clean slate each time i.e. new lock and cache files each run.

I tried tofu init -upgrade but it persists, so it leads me to believe this is a cache issue on this side - Please can you check this?

│ Error: Failed to download module
│ 
│   on .terraform/xxxx/vpc.tf line 2:
│    2: module "vpc" {
│ 
│ Could not download module "vpc"
│ (.terraform/xxxx/vpc.tf:2)
│ source code from
│ "git::https://github.com/terraform-aws-modules/terraform-aws-vpc?ref=v5.21.1":
│ error downloading
│ 'https://github.com/terraform-aws-modules/terraform-aws-vpc?ref=v5.21.1':
│ /usr/bin/git exited with 1: error: pathspec 'v5.21.1' did not match any
│ file(s) known to git
│ .

If your request is for a new feature, please use the Feature request template.

  • ✋ I have searched the open/closed issues and my issue is not listed.

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

  • Module version [Required]: ~> 5.0 (fetches 5.21.1 which was removed as it had a bug)

  • Tofu version: 1.91

  • Provider version(s): 5.x

Reproduction Code [Required]

using version = "~> 5.0" will fetch the incorrect version of the module

Steps to reproduce the behaviour:

  1. using version = "~> 5.0" of the module
  2. fetches 5.21.1 which was removed due to Unsupported attribute - Region #1203 (comment)
  3. error presented

Expected behavior

Actual behavior

downloads latest version of 5.x, which is 5.21.0

Terminal Output Screenshot(s)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions