-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Unable to fetch module from Terraform Registry #23721
Comments
We've found that changing the version to an earlier release of the module lets it download. This might be a caching issue on the registry or github's side? Full steps:
module "label-no-work" {
source = "cloudposse/label/null"
version = "0.14.0"
}
This is reproduced on the 2 machines with the above root module |
We experience similar issues with When Downloading terraform-aws-modules/security-group/aws 3.0.1 for ms_sample_iam_and_dynamodb.rds_sg...
2019/12/19 14:19:45 [DEBUG] will download "https://api.github.com/repos/terraform-aws-modules/terraform-aws-security-group/tarball/v3.0.1?archive=tar.gz" to .terraform/modules/ms_sample_iam_and_dynamodb.rds_sg
Error: Failed to download module
Could not download module "rds_sg" (../../rds.tf:18) source code from
"https://api.github.com/repos/terraform-aws-modules/terraform-aws-security-group/tarball/v3.0.1//*?archive=tar.gz":
Error opening a gzip reader for /tmp/getter158255156/archive: EOF. When Downloading terraform-aws-modules/security-group/aws 3.0.1 for ms_sample_iam_and_dynamodb.rds_sg...
2019/12/19 14:17:20 [DEBUG] will download "https://api.github.com/repos/terraform-aws-modules/terraform-aws-security-group/tarball/v3.0.1?archive=tar.gz" to .terraform/modules/ms_sample_iam_and_dynamodb.rds_sg
2019/12/19 14:17:23 [DEBUG] Module installer: ms_sample_iam_and_dynamodb.rds_sg installed at .terraform/modules/ms_sample_iam_and_dynamodb.rds_sg/terraform-aws-modules-terraform-aws-security-group-a332a3b
- ms_sample_iam_and_dynamodb.rds_sg in .terraform/modules/ms_sample_iam_and_dynamodb.rds_sg/terraform-aws-modules-terraform-aws-security-group-a332a3b |
I'm having similar issues with modules The problem seems to be intermittent, as every once in a while it manages to fetch the modules and succeeds. This looks like a problem on GitHub's side to me. |
I could reproduce with the following commands: git clone [email protected]:terraform-aws-modules/terraform-aws-atlantis.git
cd terraform-aws-atlantis
export project="examples/full"
cat <<EOF > "${project}/main.tf"
module "atlantis" {
source = "github.com/terraform-aws-modules/terraform-aws-atlantis?ref=v2.4.0"
name = "atlantis"
# VPC
cidr = "10.20.0.0/16"
azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
private_subnets = ["10.20.1.0/24", "10.20.2.0/24", "10.20.3.0/24"]
public_subnets = ["10.20.101.0/24", "10.20.102.0/24", "10.20.103.0/24"]
# DNS (without trailing dot)
route53_zone_name = "example.com"
# ACM (SSL certificate) - Specify ARN of an existing certificate or new one will be created and validated using Route53 DNS
certificate_arn = "arn:aws:acm:eu-west-1:135367859851:certificate/70e008e1-c0e1-4c7e-9670-7bb5bd4f5a84"
# Atlantis
atlantis_github_user = "atlantis-bot"
atlantis_github_user_token = "examplegithubtoken"
atlantis_repo_whitelist = ["github.com/terraform-aws-modules/*"]
}
EOF
docker run -it --rm -v "${PWD}:/t" -e TF_LOG=DEBUG --workdir "/t/${project}" hashicorp/terraform:light init \
-verify-plugins=true \
-lock=false \
-upgrade=true \
-reconfigure \
-input=false \
-get-plugins=true \
-get=true \
. I get the following output:
|
Waiting on upstream: hashicorp/go-getter#227. Regarding the other caveats of the getter behavior; as it's used in Terraform it shouldn't directly effect the module installation process. |
I believe I'm having this exact problem, except @cybojenix's workaround didn't help (that is, the original version I specified never downloads, failing with the exact same error, even after an earlier one succeeds). I'm using Dropping back to v2.0.0 allowed the download to work. I'm wondering what the sanest workaround for this is, since I don't need 2.0.1 in this case, but this could be a showstopper should a specific version be needed in the future. |
I experienced this issue when I was trying to destroy a aws-terraform-modules/security-group with terraform v0.12.18 and then it resolved by changing to v0.12.19. Seen it with the null-label module as well recently. |
This was also fixed for me by upgrading to 0.12.19 |
Is there a fix that doesn't involve updating Terraform? We are on 0.12.13 and just started getting this on one of our systems, but need to update a lot of our syntax and redeploy some resources just to update. |
Similar to @HMilbradt, we are hoping for a fix that doesn't involve upgrading to 0.12.19. We've had issues with the past related to new Terraform versions and older versions of provider modules that we are using. We want to upgrade to the latest versions of everything, but would prefer to have scheduled these upgrades. Our tests rely on previous versions of Terraform and we've been communicating to our users to use a specific version of Terraform to avoid provider issues. If there isn't a fix for older versions of Terraform ASAP, then we have to scramble to upgrade our modules to support 0.12.19 and communicate to our users that they need to upgrade as well. Happy to help with anything we can. |
Me too. Thanks |
Can confirm no further issues with 0.12.19, but a solid workaround for those of us stuck on older revs would be useful. |
We used a workaround that is clone the module directly using git rather than relying on terraform registry. |
This should now be working again for Terraform 0.12.0 to 0.12.18. More information here: #23834. |
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. |
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/cybojenix/2fbee976a0cb337ceb56a9ec1f5efb5c
Expected Behavior
All 3 modules download on
terraform init
andterraform get -update
Actual Behavior
the
cybojenix/publish/testing
andcloudposse/label/[email protected]
fetch correctly.The
cloudposse/label/[email protected]
module (label-no-work
) does not download correctly.Steps to Reproduce
terraform init
, orterraform get -update
Additional Context
Using Curl or a browser correctly downloads tar file for the 0.16.0 release.
We use several other modules, and they all work.
We've been using the module in question for a while. This issue has only just presented itself today.
This is verified on 2 machines, using fresh directories for both
init
andget
The text was updated successfully, but these errors were encountered: