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

Constrain only the minimum allowed version #359

Closed
naseemkullah opened this issue Dec 2, 2019 · 4 comments · Fixed by #361
Closed

Constrain only the minimum allowed version #359

naseemkullah opened this issue Dec 2, 2019 · 4 comments · Fixed by #361
Labels
bug Something isn't working P1 highest priority issues

Comments

@naseemkullah
Copy link
Contributor

naseemkullah commented Dec 2, 2019

Hi,

I use a thin wrapper around this module as follows:

In main.tf I have defined the google-beta provider pinned to v2.20.0 as well as:

module gke_us_east {
  source       = "../../modules/zonal-cluster"
[...]
}

Then my zonal-cluster module(which is a wrapper around this repo)'s maint.tf:

module "gke" {
  source                  = "terraform-google-modules/kubernetes-engine/google//modules/beta-public-cluster"
  version                 = "6.0.0"
[...]

I am currently faced with the following issue:

No provider "google-beta" plugins meet the constraint "v2.20.0,~> 2.18.0".

Which was introduced by the new constraint within this module for google-beta provider ~> 2.18.0, which seems like the right thing to do, but I am unsure how to workaround my setup's issue.

Taken from output of terraform providers:

└── module.gke_us_east
    ├── provider.google
    ├── provider.kubernetes
    └── module.gke
        ├── provider.google (inherited)
        ├── provider.google-beta ~> 2.18.0
        ├── provider.kubernetes
        ├── provider.null
        └── provider.random
@morgante
Copy link
Contributor

morgante commented Dec 2, 2019

Sorry for the issue!

It looks like we're pinning to ~> 2.18.0 which is too pessimistic. We should pin to ~> 2.18 instead.

@naseemkullah
Copy link
Contributor Author

Ah I see! Just read up this terraform documentation on provider versions and indeed:

Re-usable modules should constrain only the minimum allowed version, such as >= 0.12.0.

@naseemkullah naseemkullah changed the title Provider issue for module that wraps this module Constrain only the minimum allowed version Dec 2, 2019
@naseemkullah
Copy link
Contributor Author

~> 2.18 would be anything above 2.18.0 but anything less than 3.0.0 is that right?

Would it be better to ping to >=2.18.0 ? 3.0.0 is right around the corner after all

@morgante
Copy link
Contributor

morgante commented Dec 2, 2019

We don't support 3.0.0 yet, but once we do we can definitely update it for that.

@morgante morgante added P1 highest priority issues bug Something isn't working labels Dec 2, 2019
aaron-lane added a commit that referenced this issue Dec 2, 2019
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this issue Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 highest priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants