Provider does not auth with \n in private_key #2145
Labels
awaiting-affected-resources
Please Provide the affected resource name in description. ex. Affected resource - oci_core_instance
bug
Community Note
Terraform Version and Provider Version
Terraform v1.7.5
on linux_amd64
Affected Resource(s)
affected_resources = terraform
Terraform Configuration Files
Debug Output
https://gist.github.com/Tmanoche/4641860c452e6794f040bfbc4851c637
Panic Output
Expected Behavior
We should be able to use an example private key format in our TF_VAR_private_key:
We cannot paste keys with actual new lines in Terraform Cloud, so we must use \n.
Actual Behavior
Error:
Steps to Reproduce
Export all of the necessary variables for the OCI provider:
TF_VAR_user_ocid
TF_VAR_fingerprint
TF_VAR_tenancy_ocid
TF_VAR_private_key
Run terraform plan.
You will run into an auth error.
Important Factoids
I tested provider changes locally to fix this issue.
I changed these lines:
https://github.com/oracle/terraform-provider-oci/blob/master/internal/provider/provider.go#L553-L555
To:
When I run terraform plan with a dev config pointing to my updated test provider, the private key is able to auth just fine. When I point back to the latest OCI provider, it fails. All with the same environment/env vars.
References
The text was updated successfully, but these errors were encountered: