-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use OCI_ prefixed environment variables (like OCI_CLI_, not TF_VAR_) #318
Comments
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, 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. |
@varmax2511, @rashik-bhasin, and @govindrao55, could you please take a look? |
💯 this is bizarre unexpected behavior that makes interaction with terraform highly confusing. |
is there any workaround for this. I am not able to use environment variables |
Out of pure curiosity, how is that possible? Environment variables are 50+ year old technology. |
even if we are using TF_VAR prefix, what should be the environment name variables that needs to be set. I tried with the below it didnt work
i am fairly new to using go sdk for oci |
i am doing like this for setting the provider. This way i dont need TF_VAR prefix
|
I'm referring to this implementation:
oci-go-sdk/common/client.go
Line 283 in 977324a
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
The text was updated successfully, but these errors were encountered: