-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
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:
- Remove the local
.terraformdirectory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/ - Re-initialize the project root to pull down modules:
terraform init - 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:
- using version = "~> 5.0" of the module
- fetches 5.21.1 which was removed due to Unsupported attribute - Region #1203 (comment)
- error presented
Expected behavior
Actual behavior
downloads latest version of 5.x, which is 5.21.0