I am trying to run terraform plan from bitbucket pipelines. I have mapped the necessary rolearns to EKS. It works from my local but gives this error:
Has Anyone done this workflow:
Terraform to provision EKS in a separate AWS account from pipeline using OIDC
│ Error: Kubernetes cluster unreachable: Get "https://XXXXXXXXXXX.gr7.us-east-1.eks.amazonaws.com/version": getting credentials: exec: executable aws not found
It looks like you are trying to use a client-go credential plugin that is not installed.
To learn more about this feature, consult the documentation available at:
│ https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins
Hi @vgautam and welcome to the community!
The output you shared here includes the following error:
executable aws not found
Is this the output of an AWS CLI command?
Pipelines builds that run on Atlassian's infrastructure use Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. Any tools you use in that step's script need to be preinstalled in the Docker image you use as a build container or (if they are not) you need to install them during the build by adding the necessary commands in the yml file's script.
If it is indeed the AWS CLI that is missing from your build, you can either use a different Docker image as a build container, one that has AWS CLI preinstalled, or you can install it during the build. You can find details here:
The instructions for Linux are relevant in this case and you don't need to use sudo as the build runs with root user.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.