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

AWS version mismatch between several modules #41

Closed
tirumerla opened this issue Oct 30, 2020 · 4 comments
Closed

AWS version mismatch between several modules #41

tirumerla opened this issue Oct 30, 2020 · 4 comments
Labels
bug 🐛 An issue with the system

Comments

@tirumerla
Copy link

tirumerla commented Oct 30, 2020

Describe the Bug

Hello Team -

I started using terraform-aws-eks-node-group module and it uses provider hashicorp/aws version >=3.0.* while the other modules uses version ~> 2.0. This is causing the issue when nodegroups are used with loadbalancers, keypair and rds modules.

Terraform version: v0.13.5
Running terraform init throws

- Using hashicorp/local v1.4.0 from the shared cache directory
- Using hashicorp/template v2.2.0 from the shared cache directory
- Using hashicorp/tls v2.2.0 from the shared cache directory
- Using hashicorp/kubernetes v1.13.3 from the shared cache directory
- Using -/template v2.2.0 from the shared cache directory

Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/aws:
no available releases match the given constraints ~> 2.0, ~> 2.0, ~> 2.0, >=
2.0.*, >= 2.0.*, < 4.0.*, >= 3.0.*, >= 3.0.*, >= 2.0.*, ~> 2.0, ~> 2.0

Providers list

Providers required by configuration:
.
├── provider[registry.terraform.io/hashicorp/aws]
├── provider[registry.terraform.io/hashicorp/random]
├── provider[registry.terraform.io/hashicorp/null]
├── provider[registry.terraform.io/hashicorp/local]
├── module.bastion_autoscale
│   ├── provider[registry.terraform.io/hashicorp/null] ~> 2.0
│   ├── provider[registry.terraform.io/hashicorp/aws] >= 2.0.*
│   ├── provider[registry.terraform.io/hashicorp/template] ~> 2.0
│   └── module.label
├── module.eks_cluster
│   ├── provider[registry.terraform.io/hashicorp/template] ~> 2.0
│   ├── provider[registry.terraform.io/hashicorp/null] ~> 2.0
│   ├── provider[registry.terraform.io/hashicorp/local] ~> 1.3
│   ├── provider[registry.terraform.io/hashicorp/kubernetes] ~> 1.11
│   ├── provider[registry.terraform.io/hashicorp/aws] >= 2.0.*, < 4.0.*
│   ├── module.label
│   └── module.this
├── module.eks_node_group1
│   ├── provider[registry.terraform.io/hashicorp/random] >= 2.0.*
│   ├── provider[registry.terraform.io/hashicorp/aws] >= 3.0.*
│   ├── provider[registry.terraform.io/hashicorp/template] >= 2.0.*
│   ├── provider[registry.terraform.io/hashicorp/local] >= 1.3.*
│   ├── module.label
│   └── module.this
├── module.eks_node_group2
│   ├── provider[registry.terraform.io/hashicorp/local] >= 1.3.*
│   ├── provider[registry.terraform.io/hashicorp/random] >= 2.0.*
│   ├── provider[registry.terraform.io/hashicorp/aws] >= 3.0.*
│   ├── provider[registry.terraform.io/hashicorp/template] >= 2.0.*
│   ├── module.label
│   └── module.this
├── module.external_alb
│   ├── provider[registry.terraform.io/hashicorp/local] >= 1.3.*
│   ├── provider[registry.terraform.io/hashicorp/aws] >= 2.0.*
│   ├── provider[registry.terraform.io/hashicorp/template] >= 2.0.*
│   ├── provider[registry.terraform.io/hashicorp/null] >= 2.0.*
│   ├── module.default_target_group_label
│   ├── module.access_logs
│       ├── provider[registry.terraform.io/hashicorp/aws] ~> 2.0
│       ├── provider[registry.terraform.io/hashicorp/local] ~> 1.2
│       ├── provider[registry.terraform.io/hashicorp/null] ~> 2.0
│       ├── module.label
│       └── module.s3_bucket
│           ├── provider[registry.terraform.io/hashicorp/null] ~> 2.0
│           ├── provider[registry.terraform.io/hashicorp/aws] ~> 2.0
│           ├── provider[registry.terraform.io/hashicorp/local] ~> 1.2
│           └── module.default_label
│   └── module.default_label
├── module.label
├── module.rds_instance
│   ├── provider[registry.terraform.io/hashicorp/null] ~> 2.0
│   ├── provider[registry.terraform.io/hashicorp/aws] ~> 2.0
│   ├── provider[registry.terraform.io/hashicorp/template] ~> 2.0
│   ├── module.dns_host_name
│       ├── provider[registry.terraform.io/hashicorp/local] ~> 1.2
│       └── provider[registry.terraform.io/hashicorp/aws] ~> 2.0
│   ├── module.final_snapshot_label
│   └── module.label
└── module.ssh_key_pair
    ├── provider[registry.terraform.io/hashicorp/null] ~> 2.1
    ├── provider[registry.terraform.io/hashicorp/aws] ~> 2.0
    ├── provider[registry.terraform.io/hashicorp/tls] ~> 2.0
    ├── provider[registry.terraform.io/hashicorp/local] ~> 1.3
    └── module.label
Providers required by state:
    provider[registry.terraform.io/-/template]
    provider[registry.terraform.io/hashicorp/aws]

Based on the modules i'm using here are the modules that needs to be changed from ~> 2.0 to >= 2.0

  • terraform-aws-key-pair
  • terraform-aws-rds
    • dns_host_name
  • terraform-aws-alb
    • access_logs
      • s3_bucket

Expected Behavior

All the plugins/providers should have been installed without any issue

Steps to Reproduce

Use eks-node-group module with latest tag (0.13.0) with aws-alb and aws-rds modules with latest tags.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: OSX
  • Version: 10.15.7

Output terraform -version:

Terraform v0.13.5
+ provider registry.terraform.io/-/template v2.2.0
+ provider registry.terraform.io/hashicorp/kubernetes v1.13.3
+ provider registry.terraform.io/hashicorp/local v1.4.0
+ provider registry.terraform.io/hashicorp/null v2.1.2
+ provider registry.terraform.io/hashicorp/random v3.0.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/hashicorp/tls v2.2.0

Thanks.

@tirumerla tirumerla added the bug 🐛 An issue with the system label Oct 30, 2020
@sivarita
Copy link

I had the same problem, the only version that I could run is the one with the tag 0.8.0, before that it only works with terraform 0.12

@osterman
Copy link
Member

Sorry about that! We might have some pinning that needs updating. We have evolved our thinking on pinning and now require a minimum known working provider (>=) version and core version. We no longer recommend using (~>) and still have remnants of that. We will gladly accept and promptly review all PRs to correct pinning.

Ping us on slack if we don't respond in a timely manner.

@tirumerla
Copy link
Author

Thanks @osterman. Raised PR's for the modules causing issues for aws plugin with version ~> 2.0

@Nuru
Copy link
Sponsor Contributor

Nuru commented Aug 27, 2021

I believe this has been fixed. If not, please open a new issue.

@Nuru Nuru closed this as completed Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

4 participants