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

Version 1.11 of Terraform kubernetes provider causes stack launch failure #90

Closed
darren-reddick opened this issue Feb 21, 2020 · 4 comments

Comments

@darren-reddick
Copy link

Using the latest version of the kubernetes provider fails to launch the aws quickstart stack (quickstart/src/configurations/eks) with error:

Error: Failed to initialize config: invalid configuration: no configuration has been provided

This seems to be a known issue - see hashicorp/terraform-provider-kubernetes#759

Pinning the provider at 1.10 seems to be a workaround for the issue:

quickstart/src/configurations/eks/versions.tf
terraform {
  required_version = ">= 0.12"
  required_providers {
    kubernetes = "1.10"
  }
}
@pst
Copy link
Member

pst commented Feb 22, 2020

The provider versions are supposed to be pinned, see: https://github.com/kbst/terraform-kubestack/blob/master/aws/cluster/providers.tf

Each cluster module has this.

If this does not ensure the provider has the correct version, this needs investigation. Moving the provider version pinning to the versions.tf may be one option.

Reading the issue you linked, it seems this does not only apply to EKS, but also GKE and AKS. It seems it's related to creating the cluster and the k8s resources on it in the same TF apply run. This is something Kubestack depends heavily on and which worked fine before this upstream change.

@darren-reddick
Copy link
Author

I will try to look at this again later to see if I get the same behaviour. Although I did follow the quick start guide it is possible that I missed something.

@darren-reddick
Copy link
Author

I tried this again and got the same behaviour.

After a bit of digging I found that it seems to be the way that the pessimistic constraint operator evaluates the allowed versions. If you include the patch version in the version string it seems to work as intended. e.g. 1.10.0 or alternatively use the exact version operator.

Someone has raised an issue here hashicorp/go-version#55 some time ago but have no response.

@pst
Copy link
Member

pst commented Feb 23, 2020

.
├── provider.aws.eks_zero
├── provider.azurerm
├── provider.google
├── module.aks_zero
│   ├── provider.azuread ~> 0.7.0
│   ├── provider.azurerm ~> 1.44.0
│   ├── provider.external ~> 1.2.0
│   ├── provider.kubernetes ~> 1.10.0
│   ├── provider.random ~> 2.2.1
│   ├── provider.template ~> 2.1.2
│   ├── module.cluster
│   │   ├── provider.azuread (inherited)
│   │   ├── provider.azurerm (inherited)
│   │   ├── provider.kubernetes.aks
│   │   ├── provider.random (inherited)
│   │   └── module.cluster_services
│   │       ├── provider.kustomization
│   │       └── provider.template
│   └── module.cluster_metadata
├── module.eks_zero
│   ├── provider.aws ~> 2.50.0
│   ├── provider.external ~> 1.2.0
│   ├── provider.kubernetes ~> 1.10.0
│   ├── provider.template ~> 2.1.2
│   ├── module.cluster
│       ├── provider.aws (inherited)
│       ├── provider.kubernetes.eks
│       ├── module.cluster_services
│           ├── provider.kustomization
│           └── provider.template
│       └── module.node_pool
│           └── provider.aws (inherited)
│   └── module.cluster_metadata
└── module.gke_zero
    ├── provider.external ~> 1.2.0
    ├── provider.google ~> 3.9.0
    ├── provider.kubernetes ~> 1.10.0
    ├── provider.template ~> 2.1.2
    ├── module.cluster
    │   ├── provider.external
    │   ├── provider.google (inherited)
    │   ├── provider.kubernetes.gke
    │   ├── module.cluster_services
    │   │   ├── provider.kustomization
    │   │   └── provider.template
    │   └── module.node_pool
    │       └── provider.google (inherited)
    └── module.cluster_metadata

@pst pst closed this as completed in 9c6f75b Feb 23, 2020
pst added a commit that referenced this issue Feb 23, 2020
Lock provider major, minor and patch versions fix #90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants