oci-go-sdk icon indicating copy to clipboard operation
oci-go-sdk copied to clipboard

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

Open MPV opened this issue 2 years ago • 4 comments

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 avatar Sep 07 '21 11:09 MPV

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.

MPV avatar Sep 07 '21 11:09 MPV

@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 avatar Sep 08 '21 04:09 pelliu

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

pelliu avatar Sep 08 '21 04:09 pelliu

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

tkellen avatar Apr 24 '24 12:04 tkellen