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

Error: Failed to construct REST client #4

Closed
kupson opened this issue Mar 24, 2021 · 5 comments
Closed

Error: Failed to construct REST client #4

kupson opened this issue Mar 24, 2021 · 5 comments

Comments

@kupson
Copy link
Contributor

kupson commented Mar 24, 2021

When running on a fresh GC projects:

$ ./scripts/terraform_local_dev.sh plan

Error: Failed to construct REST client

  on certman.tf line 46, in resource "kubernetes_manifest" "cert_manager_cf_issuer":
  46: resource "kubernetes_manifest" "cert_manager_cf_issuer" {

cannot create REST client: no client config
@kupson
Copy link
Contributor Author

kupson commented Mar 24, 2021

Proper fix would require better code structure/modularisation like in this example - https://github.com/hashicorp/terraform-provider-kubernetes/tree/main/_examples/gke

Quick workaround - comment out kubernetes_manifest resource on first plan/apply run.

kupson added a commit that referenced this issue Mar 24, 2021
Still suffering from #4
@vicpara
Copy link
Collaborator

vicpara commented Mar 25, 2021

I'll be trying to deploy a new prod cluster next week on Monday. I'll go through the deployment steps and come back with feedback about the experience.

@kupson
Copy link
Contributor Author

kupson commented Mar 29, 2021

@vicpara
After fixing some more bugs affecting local re-install I managed to test working workaround for the provider-dependency issue. It's added to README.md in c4f1477.

@vicpara
Copy link
Collaborator

vicpara commented Mar 29, 2021

Awesome news. Thank you Rafal.

kupson added a commit that referenced this issue Apr 10, 2021
Fixes:
- #4

Should also fix:
- #5
- #6
@kupson
Copy link
Contributor Author

kupson commented Apr 11, 2021

Fixed by introducing preflight mode (terraform_preflight variable). Looks like to solve this and similar issues it's either two-step run of single module or splitting the project into two root modules. There are additions to installation procedure in README.md file.

@kupson kupson closed this as completed Apr 11, 2021
kupson pushed a commit that referenced this issue Apr 13, 2021
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