All Terraform 0.12 before 0.12.19.
Terraform 0.11.14 appears to be unaffected.
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
}
Module gets downloaded
$ terraform init
Initializing modules...
Downloading terraform-aws-modules/vpc/aws 2.21.0 for vpc...
Error: Failed to download module
Could not download module "vpc" (main.tf:1) source code from
"https://api.github.com/repos/terraform-aws-modules/terraform-aws-vpc/tarball/v2.21.0//*?archive=tar.gz":
Error opening a gzip reader for
/var/folders/mv/zvbyy31x0l33852hj2xws73c0000gn/T/getter639019060/archive: EOF.
Error: Failed to download module
Could not download module "vpc" (main.tf:1) source code from
"https://api.github.com/repos/terraform-aws-modules/terraform-aws-vpc/tarball/v2.21.0//*?archive=tar.gz":
Error opening a gzip reader for
/var/folders/mv/zvbyy31x0l33852hj2xws73c0000gn/T/getter639019060/archive: EOF.
rm -r .terraformterraform initWe really can't go through all our terraform configs and CI setups at the drop of a hat and update to the latest version.
I can confirm this, we tried the same 0.12.18 version on the same project we lastly modified before christmas, and it's working. 0.12.19 does not mention any change on URL handling for module download.
We confirm the 0.12.19 "fix" on at least two computers. Yesterday the 0.12.18 was still working correctly. Could it be a change in github api behaviour or something ?
We had to change the source to source = "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v2.21.0" to make it work
Hi @dpiddockcmp,
This issue is recorded in #23721. While the terraform bug is fixed in 0.12.19, the registry team is working on a mitigation to redirect the module requests to a URL that is unlikely to trigger the bug in older versions.
Thanks
Is there an open Issue somewhere for tracking where the registry team is working on a fix? This has been broken almost a month! That's pretty disappointing.
same issue with terraform-google-modules/vault/google module.
Unfortunately a recent change in GitHub infrastructure is what triggered the bug in a Terraform dependency. The only way to update the dependency is to release a new Terraform version, which in this case is 0.12.19. Earlier 0.12 versions will always contain this bug, and the best way to avoid the problem is to upgrade.
Since the Terraform issue is fixed, I can change this issue to track any registry changes, and we can close it once a determination is made if a workaround is possible at all for older versions.
Closed via #23834
Awesome. Thank you for the updates 😄
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Is there an open Issue somewhere for tracking where the registry team is working on a fix? This has been broken almost a month! That's pretty disappointing.