This topic contains instructions for completing the prerequisites, if you haven't done so already, for creating Feature Flags:
- Create a project
- Create an environment
- Create an SDK key
Before you can create a Feature Flag, you need to create a project in the Harness platform. A Feature Flag is available only for the project the flag is created in, so you need to create any flags in each project you want to use them for.
This topic describes how to create a project in the Harness Platform. For more information, go to Harness Platform documentation.
Create a project
In Harness, click Feature Flags and click Create Project.
In About the Project, in Name, enter the name for your project and select a color for it.
Click Save and Continue.
(Optional) In Invite Collaborators, in Invite People to Collaborate, add team members to the project.
(Optional) Assign a role to the collaborators and click Add. The roles you can select are:
- Project Viewer
- Project Admin
- Pipeline Executer
- Gitops Admin Role
- Feature Flag Manage Role
Click Save and Continue. Your project is created.
In your project, click Feature Flags.
Create an environment
Once you've created a project, you need to create an environment before you create a Feature Flag. Feature Flags can be used independently across multiple environments within a single project, for example:
- In Project X you have two environments,
- You create
Environment_Ayou could have
on, but in
This topic describes how to create an environment in the Harness platform.
To read more about the Harness Platform, see Harness Platform.
Before you begin
Before you create a Feature Flag, you must have:
Create an environment
In your project, in Environments, click Create an Environment.
Enter a Name for your environment.
Harness generates a unique identifier for names. For details and restrictions, go to Entity Identifier Reference.
Select the Environment type and click Create.
Your environment is created and you can find it listed in Environments.
Create an SDK Key
After you’ve created your environment, you need to create an SDK key for it. You need to use this SDK key in your application’s code to authenticate your connection to the Harness Feature Flag client.
You can view and copy the SDK key only immediately after it is created. For security, after you leave the page, the key is redacted and you can’t view it. Make sure you make a copy of the key to use in your application.
To create an SDK key:
In the environment you created, in Settings, click Create SDK Key.
In Create SDK Key, in Name, enter a name for your SDK key.
In Key Type, select either Client or Server depending on the type of SDK you want to use. For more information about the SDK types Harness supports, go to Chose a Client-side or Server-side SDK. If your organization needs to rotate the keys, you can choose to add more than one key for the same environment.
Copy and store your Secret.note
You can only view and copy the SDK key immediately after it is created. For security, after you leave the page, the key is redacted and you can’t view it. Make sure you make a copy of the key to use in your application.