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

Terraform init failing for terraform version < 1.X #2126

Closed
1 task done
junaid-ali opened this issue Jun 28, 2022 · 3 comments · Fixed by #2127
Closed
1 task done

Terraform init failing for terraform version < 1.X #2126

junaid-ali opened this issue Jun 28, 2022 · 3 comments · Fixed by #2127

Comments

@junaid-ali
Copy link
Contributor

junaid-ali commented Jun 28, 2022

Description

This module no longer seems to be working for terraform < 1.0

$ terraform init -upgrade
Upgrading modules...
Downloading terraform-aws-modules/eks/aws 18.26.0 for eks...
- eks in .terraform/modules/eks
- eks.eks_managed_node_group in .terraform/modules/eks/modules/eks-managed-node-group
- eks.eks_managed_node_group.user_data in .terraform/modules/eks/modules/_user_data
- eks.fargate_profile in .terraform/modules/eks/modules/fargate-profile
Downloading terraform-aws-modules/kms/aws 1.0.0 for eks.kms...
- eks.kms in .terraform/modules/eks.kms
- eks.self_managed_node_group in .terraform/modules/eks/modules/self-managed-node-group
- eks.self_managed_node_group.user_data in .terraform/modules/eks/modules/_user_data
....

Error: Unsupported Terraform Core version

  on .terraform/modules/eks.kms/versions.tf line 2, in terraform:
   2:   required_version = ">= 1.0"

Module module.eks.module.kms (from terraform-aws-modules/kms/aws) does not
support Terraform version 0.14.11. To proceed, either choose another supported
Terraform version or update this version constraint. Version constraints are
normally set for good reason, so updating the constraint may lead to other
errors or unexpected behavior.

It could be due to the kms module which was added in v18.24.1...v18.25.0

  • ✋ 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]: 18.26.0

  • Terraform version: 0.14.6

  • Provider version(s): aws v4.20.1

Reproduction Code [Required]

Steps to reproduce the behavior:

  1. Remove the .terraform directory
  2. Run terraform init with a terraform version less 1.x

Expected behavior

Actual behavior

Terminal Output Screenshot(s)

Additional context

@bryantbiggs
Copy link
Member

oof, thanks for reporting. I'll have a fix shortly

@antonbabenko
Copy link
Member

This issue has been resolved in version 18.26.1 🎉

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants