Open bschonec opened 6 months ago
@bschonec How is your workspace configuration done on TF Cloud?
It is my understanding that you either can set it to CLI driven or to use a version control workflow, but in both situations it is TF Cloud which is running the plan / apply and the log is streamed to the client. So, It's not just a storage backend for the state file.
In that case it is normal that it requests the key as it doesn't have access to your key file.
Within TF Cloud you can define variables for your workspace / project and also set them to sensitive (write only). This allows you to define a private_key variable and mark it as sensitive, which will be picked up during the run
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.
I switched from using both local and http backends to store my tfstate file to the free tier of Terraform Cloud. I am using the private_key_path argument to in the OCI provider to specify the token for Oracle Cloud API access. I am not using private_key argument to the OCI provider. After changing the terraform code from http backend to Terraform Cloud Configuration, 'terraform apply' now requires me to specify the private_key argument to the OCI provider even though this was not necessary before moving to Terraform Cloud.
The OCI provider documentation states that private_key_path is used if private_key is not defined which is the behavior with the local and http backends. This is not the behavior I am experiencing when using Terraform Cloud.
Community Note
Terraform Version and Provider Version
Affected Resource(s)
provider "oci"
Terraform Configuration Files
Debug Output
Expected Behavior
terraform plan should not be erroring out when private_key_path is specified but private_key is not specified.
Note that if I do specify the private_key value, 'terraform plan' works fine.