Forum Stats

  • 3,768,655 Users
  • 2,252,827 Discussions


OCI terraform provider error when running on Jenkins Pipeline

User_P7OS8 Member Posts: 2 Green Ribbon

Hello. I’m using Jenkins to deploy terraform using Pipelines to OCI. The code runs when executed on the Linux Machine that has Jenkins installed, but when I try to execute the same code using Jenkins Pipelines, I get the error message:

e[31m│e[0m e[0me[1me[31mError: e[0me[0me[1mcan not create client, bad configuration: did not find a proper configuration for private keye[0m

e[31m│e[0m e[0m

e[31m│e[0m e[0me[0m with provider[“”],

e[31m│e[0m e[0m on line 15, in provider “oci”:

e[31m│e[0m e[0m 15: provider “oci” e[4m{e[0me[0m

e[31m│e[0m e[0m

I’m fairly new to Jenkins, what could I be missing in the configurations? A few extra things I have done:

  • I have copied the RSA key to the Jenkins workspace and the private_key_path points there
  • Configurations are exactly the same as the code running on the VM (Does Jenkins need an extra atribute?)

Here is the current provider code:

provider “oci” {

tenancy_ocid = var.tenancy_ocid

user_ocid = var.user_ocid

fingerprint = var.fingerprint

private_key_path = var.private_key_path

region = var.region


Please help.