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 during terraform execution about missing kubectl with v8.5.1 of this project #308

Open
1 task done
miaeyg opened this issue Oct 7, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working new Added to an issue when it's new ;)

Comments

@miaeyg
Copy link

miaeyg commented Oct 7, 2024

Terraform Version Details

{
"terraform_version": ""1.8.4"",
"terraform_revision": "null",
"terraform_outdated": "true",
"provider_selections": "{"registry.terraform.io/hashicorp/aws":"5.70.0","registry.terraform.io/hashicorp/cloudinit":"2.3.5","registry.terraform.io/hashicorp/external":"2.3.4","registry.terraform.io/hashicorp/kubernetes":"2.32.0","registry.terraform.io/hashicorp/local":"2.5.2","registry.terraform.io/hashicorp/null":"3.2.3","registry.terraform.io/hashicorp/random":"3.6.3","registry.terraform.io/hashicorp/time":"0.12.1","registry.terraform.io/hashicorp/tls":"4.0.6"}"

Terraform Variable File Details

Not relevant

Steps to Reproduce

Run terraform without using a Docker image. I got this error:

│ Error: local-exec provisioner error
│
│   with terraform_data.run_command[0],
│   on main.tf line 232, in resource "terraform_data" "run_command":
│  232:   provisioner "local-exec" {
│
│ Error running command 'kubectl --kubeconfig=mia-eks-kubeconfig.conf patch storageclass gp2 --patch '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' ': exit status 127. Output: /bin/sh: line 1:
│ kubectl: command not found

Expected Behavior

No errors should be produced

Actual Behavior

Errors about kubectl not found.

Additional Context

I guess the problem is that my local kubectl is not in the default PATH but I expect the Terraform script to verify this before it starts executing

References

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@miaeyg miaeyg added bug Something isn't working new Added to an issue when it's new ;) labels Oct 7, 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 new Added to an issue when it's new ;)
Projects
None yet
Development

No branches or pull requests

1 participant