Open luckeyca opened 3 months ago
Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances
If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform
As this works through automation, request you to follow exact syntax.
Hi, updated "affected_resources" as instructed. Please let me know if you need more details.
Hi, Please make sure developers tested the following two situations using ENCRYPTED keys, NOT keys without password
export TF_VAR_fingerprint= export TF_VAR_user_oci= export TF_VAR_tenancy_ocid= export TF_VAR_region= export TF_VAR_private_key_password= export TF_VAR_private_key_path=
We DO NOT set these settings in the provider block given it's static, but only use ~/.oci/config and TFVAR environment variables. DO need BOTH ~/.oci/config AND TFVAR environment variables work independently for different use cases.
Community Note
Terraform Version and Provider Version
Terraform v1.5.4 on linux_amd64
Affected Resource(s)
affected_resources = terraform
Terraform Configuration Files
N/A
Expected Behavior
As per issue: https://github.com/oracle/oci-go-sdk/issues/242, terraform should support both PKCS#1 and PKCS#8 API key formats.
Actual Behavior
It doesn't support PKCS#8 format. If the API key is generated using openssl version 3 with the newer header, terraform plan/apply will fail with error: Error: can not create client, bad configuration: did not find a proper configuration for private key. newer header format: -----BEGIN ENCRYPTED PRIVATE KEY-----
Once created key with PKCS#1 format using openssl version 1 with the older header, terraform plan/apply works fine. older header format:
-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-256-CBC,
Steps to Reproduce
if the commands 1&2 were done using openssl version 1, terraform plan will succeed, if using openssl version 3, terraform plan will fail.
Important Factoids
References