Open Tmanoche opened 1 month ago
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
@Tmanoche - Did you try the same thing using private_key_path?
I don't think we can assume //n new lines in the key and replace the key content. I would recommend to use path instead so that you don't have to modify the key content.
Community Note
Terraform Version and Provider Version
Terraform v1.7.5 on linux_amd64
provider registry.terraform.io/hashicorp/time v0.11.2 provider registry.terraform.io/oracle/oci v6.10.0
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
Planning failed. Terraform encountered an error while generating this plan.
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 encounter 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:
References