oracle / oci-go-sdk

Go SDK for Oracle Cloud Infrastructure
https://cloud.oracle.com/cloud-infrastructure
Other
174 stars 82 forks source link

Use OCI_ prefixed environment variables (like OCI_CLI_, not TF_VAR_) #318

Open MPV opened 3 years ago

MPV commented 3 years ago

I'm referring to this implementation:

https://github.com/oracle/oci-go-sdk/blob/977324a51de5a48c3fc9b1c424b1742eb66ee0bd/common/client.go#L283

And comparing with the naming convention of the environment variables of oci-cli: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/clienvironmentvariables.htm#CLI_Environment_Variables

...and how other Terraform providers are able to pick up "usual" CLI environment variables: https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#full-reference

MPV commented 3 years ago

Somewhat unsure as to whether if it would be preferred to have this issue/change in this SDK repo, or in the TF provider, but it seems like the implementation originated from this repo, hence why I created it here.

pelliu commented 3 years ago

@MPV, thank you for letting us know your question, it seems like the terraform provider related questions, even environmentProvider := environmentConfigurationProvider{EnvironmentVariablePrefix: "TF_VAR"} was contributed by TF team. I'd asked TF team to take a look, they will reply here, or you can also ask https://github.com/terraform-providers/terraform-provider-oci.

pelliu commented 3 years ago

@varmax2511, @rashik-bhasin, and @govindrao55, could you please take a look?

tkellen commented 4 months ago

💯 this is bizarre unexpected behavior that makes interaction with terraform highly confusing.