oracle / oci-go-sdk

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

support the same environment variables as the CLI #495

Open tkellen opened 7 months ago

tkellen commented 7 months ago

When consuming this SDK via terraform, it is not possible to use the environment variables documented in the CLI here: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/clienvironmentvariables.htm

I would expect a terraform configuration as follows:

provider "oci" {
  region = "us-chicago-1"
}

...to function with the profile in ~/.oci/config if I ran OCI_CLI_PROFILE=myprofile terraform apply. It appears the env vars for the CLI are specific to the python implementation?

This is very confusing.

/ref https://github.com/oracle/oci-go-sdk/pull/494

tkellen commented 7 months ago

As a possible alternative, just specify a common set of new environment variables that are accepted in every language and implementation so that end users have a consistent experience interacting with OCI tooling? That seems like a large effort but as a new user it is quite byzantine coming from other ecosystems (GCP/AWS/Azure etc).