Bug Report
While working on the code I kept getting an error message like :
failed to create resource principal provider: can not create resource principal, environment variable: OCI_RESOURCE_PRINCIPAL_VERSION, not present
However the env variable that I was actually missing was OCI_RESOURCE_PRINCIPAL_RPST.
This is due to the fact that the error message is incorrect, see : https://github.com/oracle/oci-go-sdk/blob/master/common/auth/resource_principal_key_provider.go#L92 it should be ResourcePrincipalRPSTEnvVar and not ResourcePrincipalVersionEnvVar
Replications Steps
Set all required env variables and omit OCI_RESOURCE_PRINCIPAL_RPST then run the code to see the misleading error message.