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

Workload identity module doesn't declare kubernetes provider dependency #979

Closed
jackwhelpton opened this issue Aug 18, 2021 · 2 comments · Fixed by #1035
Closed

Workload identity module doesn't declare kubernetes provider dependency #979

jackwhelpton opened this issue Aug 18, 2021 · 2 comments · Fixed by #1035
Labels
bug Something isn't working P3 medium priority issues triaged Scoped and ready for work

Comments

@jackwhelpton
Copy link
Contributor

cf.:

https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/master/modules/workload-identity/versions.tf

terraform {
  required_version = ">= 0.13.0"

  provider_meta "google" {
    module_name = "blueprints/terraform/terraform-google-kubernetes-engine:workload-identity/v16.0.1"
  }
}

with, e.g.:

https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/master/modules/private-cluster/versions.tf

terraform {
  required_version = ">=0.13"

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 3.39.0, <4.0.0"
    }
    kubernetes = {
      source  = "hashicorp/kubernetes"
      version = "~> 2.0"
    }
  }
  provider_meta "google" {
    module_name = "blueprints/terraform/terraform-google-kubernetes-engine:private-cluster/v16.0.1"
  }
}

With TF 1.0.4, this results in warnings in the logs:

│ Warning: Provider kubernetes is undefined
│ 
│   on kubernetes.tf line 7, in module "workload_identity_blah":
│    7:     kubernetes = kubernetes.blah
│ 
│ Module module.workload_identity_blah does not declare a provider named
│ kubernetes.
│ If you wish to specify a provider configuration for the module, add an
│ entry for kubernetes in the required_providers block within the module.
│ 
│ (and one more similar warning elsewhere)
@bharathkkb
Copy link
Member

Thanks for the report @jackwhelpton. Also happy to review a PR adding this.

@bharathkkb bharathkkb added bug Something isn't working P3 medium priority issues triaged Scoped and ready for work labels Aug 18, 2021
@jackwhelpton
Copy link
Contributor Author

Great, thanks; I'm happy to do this, but I don't have a detailed knowledge of what the minimum/maximum version constraints should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3 medium priority issues triaged Scoped and ready for work
Projects
None yet
2 participants