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

Failed to query available provider packages error when leveraging head of beta-autopilot-private-cluster alongside head of network/google module #2210

Open
shermanericts opened this issue Dec 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@shermanericts
Copy link

shermanericts commented Dec 12, 2024

TL;DR

When leveraging the following two modules (github.com/terraform-google-modules/terraform-google-network and the beta-autopilot-private-cluster module in the terraform-google-kubernetes-engine), I'm receiving the following error:

│ Could not retrieve the list of available versions for provider hashicorp/google-beta: no available
│ releases match the given constraints >= 3.43.0, >= 4.64.0, >= 5.36.0, >= 5.40.0, != 5.44.0, < 6.2.0,
│ >= 6.13.0, < 7.0.0

Expected behavior

As of 12/10/2024, a common google-beta provider version of 5.45.0 was found. Moreover I noticed that there is an upgrade to v10.0.0 of the terraform google network provider here.

I would think there would be a working corrolary provider version in the beta-autopilot-private-cluster as well. Additionally I would have thought that downgrading terraform-google-network to 9.3.0 would have worked here.


Observed behavior

│ Could not retrieve the list of available versions for provider hashicorp/google-beta: no available
│ releases match the given constraints >= 3.43.0, >= 4.64.0, >= 5.36.0, >= 5.40.0, != 5.44.0, < 6.2.0,
│ >= 6.13.0, < 7.0.0

Terraform Configuration

Here is the heirarchy of my modules, starting at the root module

root_module/ (written by me)
|-- customer_gke_module (written by me)
    |-- gke_module (sourced below)
    |-- vpc_module (sourced below)
module "vpc" {
  source                  = "terraform-google-modules/network/google"
...



module "gke" {
  source = "github.com/terraform-google-modules/terraform-google-kubernetes-engine//modules/beta-autopilot-private-cluster?ref=main"

...

Terraform Version

Terraform v1.9.3. (i'll try again with an update to 1.10.2 latest but afaict it does not appear to be the root cause).

Additional information

I've tried the following:
* Pinning the version of "terraform-google-modules/network/google" back to 9.3.0 to no avail.

Here's what terraform providers gives me, for what it's worth:

  │   ├── module.gke
    │       ├── provider[registry.terraform.io/hashicorp/google] >= 5.40.0, != 5.44.0, < 6.2.0, < 7.0.0
    │       ├── provider[registry.terraform.io/hashicorp/google-beta] >= 5.40.0, != 5.44.0, < 6.2.0, < 7.0.0
    │       ├── provider[registry.terraform.io/hashicorp/kubernetes] ~> 2.10
    │       └── provider[registry.terraform.io/hashicorp/random] >= 2.1.0
    │   ├── module.vpc
    │       ├── provider[registry.terraform.io/hashicorp/google-beta] >= 4.64.0, < 7.0.0
    │       ├── provider[registry.terraform.io/hashicorp/google] >= 4.64.0, < 7.0.0
    │       ├── module.vpc
    │           ├── provider[registry.terraform.io/hashicorp/google] >= 4.64.0, < 7.0.0
    │           └── provider[registry.terraform.io/hashicorp/google-beta] >= 6.13.0, < 7.0.0
    │       ├── module.firewall_rules
    │           └── provider[registry.terraform.io/hashicorp/google] >= 3.33.0, < 7.0.0
    │       ├── module.routes
    │           └── provider[registry.terraform.io/hashicorp/google] >= 3.83.0, < 7.0.0
    │       └── module.subnets
    │           └── provider[registry.terraform.io/hashicorp/google] >= 4.25.0, < 7.0.0
@shermanericts shermanericts added the bug Something isn't working label Dec 12, 2024
@shermanericts
Copy link
Author

shermanericts commented Dec 12, 2024

Alas, I can get things to work if I downgrade like so. I may be missing something.

module "vpc" {
 source                  = "terraform-google-modules/network/google"     
  version = "9.3.0"

module "gke" {
  source = "github.com/terraform-google-modules/terraform-google-kubernetes-engine//modules/beta-autopilot-private-cluster?ref=v33.0.4"

But would be nice to be able to use the latest version of modules such as ⏫ this one by fixing the google-beta limitations. Happy to provide further clarity. Also, if it's better that I call these two modules separately from my root module so I can leverage the proper provider versions (using provider aliases), please advise. I can do that too going forward.

Thanks in advance!

@apeabody
Copy link
Contributor

Hi @shermanericts - I would recommend trying https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/releases/tag/v35.0.0 which was just released and supports TPG v6.11+. It should solve your issue, just be sure to review the upgrade guide.

@apeabody
Copy link
Contributor

Ahh, https://github.com/terraform-google-modules/terraform-google-network/releases/tag/v10.0.0 was only released yesterday, so still in-progress to roll out to this repo: #2213

@shermanericts
Copy link
Author

Ahh, https://github.com/terraform-google-modules/terraform-google-network/releases/tag/v10.0.0 was only released yesterday, so still in-progress to roll out to this repo: #2213

ah gotcha, nice find. Thanks!! I'll let you close this ticket or you can wait until this is merged. appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants