Oracle Cloud Infrastructure Documentation

7. Set the Context for the Fn Project CLI Using the oracle.profile Parameter

Before using Oracle Functions, you have to configure the Fn Project CLI to use the new profile you added to the Oracle Cloud Infrastructure CLI configuration file ~/.oci/config (see 2. Create a Profile in the Oracle Cloud Infrastructure CLI Configuration File). The profile you added contains the credentials of the user account you'll be using to create and deploy functions.

Note that unless you specify otherwise, the Fn Project CLI will attempt to use a profile in the ~/.oci/config file named default.

The instructions in this topic assume you have already completed the steps in 6. Create an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure.

To configure the Fn Project CLI to use the profile you've created for use with Oracle Functions:

  1. Log in to your development environment as a functions developer.

  2. In a terminal window, configure the Fn Project CLI context with the name of the profile you've created for use with Oracle Functions by entering:

    $ fn update context oracle.profile <profile-name>

    For example:

    $ fn update context oracle.profile john-oci-profile

When you have completed the steps in this topic, go on to 8. Generate an Auth Token to Enable Login to Oracle Cloud Infrastructure Registry.