Enable or Disable a Feature Flag

Updated 4 months ago by Archana Singh

This topic describes how to turn on or off a flag in the selected environment. With Harness Feature Flag, you can simply toggle the button on and off to enable or disable a flag for your environment. You can choose to change the state of the flag anytime if you have the right access to the selected environment.

  • You can turn the flag on by clicking the flag's toggle button in the dashboard or the Targeting tab.
  • By default, a feature flag is disabled on creation. You need to enable them manually when you are ready to use the Harness feature flags in your application.
  • When a flag is disabled, off variation (default variation) is served to all the users. No evaluation is done based on targeting users and targeting rules.
  • Feature flag state changes are only applicable to the selected environment. For example, you can enable a feature flag on the Test environment, while leaving it disabled on the Production environment.

In this topic:

Before You Begin

Visual Summary

Enable or Disable Feature Flags from the Flag Dashboard

Perform the following steps to enable or disable a feature flag from the dashboard:

  1. In Harness, navigate to the Feature Flags.
  2. In your Project, click Feature Flags. All the flags are listed.
  3. Toggle the button to Turn ON or OFF the Flag.
  4. Click Confirm. The flag is turned on for the environment.

Enable or Disable Feature Flags from the Targeting Tab

Perform the following steps to enable or disable a feature flag from the Targeting tab:

  1. In Harness, navigate to the Feature Flags.
  2. In your Project, click Feature Flags. All the flags are listed.
  3. Click the flag for which you want to enable or disable the flag.
  4. In the Targeting tab, toggle the button Flag is OFF.
  5. Click Save to turn the flag on for this environment upon save.


Please Provide Feedback