Vijay-Dasari / Jenkins-Terraform-EKS

Automating an EKS cluster deployment using Terraform and Jenkins
0 stars 0 forks source link

Problem Description:

Terraform Command Not Found: When running a Jenkins pipeline that includes Terraform commands, the error terraform: command not found was encountered. Environment Variable Configuration: The PATH environment variable in the Jenkins pipeline did not include the directory where Terraform was installed. Symbolic Link Confusion: The initial path provided for Terraform was a symbolic link, which was broken or incorrectly set.

Summary of the Solution: Locate the Terraform Executable: Use find to locate the actual path of the Terraform executable. Verify Permissions: Ensure the Jenkins user has execute permissions for the Terraform executable. Configure Jenkins: Update the Terraform installation path in Jenkins Global Tool Configuration. Set the PATH environment variable in the Jenkins pipeline to include the Terraform installation directory. Restart Jenkins: Restart Jenkins to apply configuration changes. Verify: Run the pipeline to ensure Terraform commands are executed without errors.