Skip to content

[BUG] Incorrect error message for missing OCI_RESOURCE_PRINCIPAL_RPST environment variable #609

@DanielRejniak

Description

@DanielRejniak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions