No results for ""
EXPAND ALL
  • Home
  • API docs

Configuring approvals for an environment

Read time: 7 minutes
Last edited: Nov 07, 2024

Overview

This topic explains how to customize approval requests for each environment in your LaunchDarkly project. For example, you can prevent LaunchDarkly from applying a proposed change if any reviewer declines an approval request for the Production environment. Or you may allow anyone, including the person making the approval request, to approve and apply a proposed change in the QA environment.

You can also require approvals on changes to flags or segments in any environment.

Requiring approvals is an Enterprise feature

Requiring approvals is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Configure approval settings

You can customize how approval requests are managed and enforced by making changes in an environment's Approval settings.

You can customize who can approve a request and how many approvals are required before a requestor can apply a change. These settings can be useful when you want to use approval requests to track the changes you make to a flag or segment, but don't want to delay applying those changes based on who has approved them.

Some custom roles bypass approval settings

If you use custom roles, you can create roles that environment approval settings do not apply to. To learn more, read Bypass required approvals below.

To configure approvals by environment:

  1. Click the project dropdown. The project menu appears:
The project menu.
The project menu.
  1. Select Project settings.
  2. Select Environments. The Environments list appears.
  3. Click on the overflow menu next to the environment you would like to configure approvals for.
  4. Choose Approval settings:
An environment's overflow menu with the "Approval settings" option.
An environment's overflow menu with the "Approval settings" option.

  1. The "Approval settings for environment" panel appears. Make other configuration changes you wish. Information on configurable fields in the "Approval settings" panel is below, after this procedure.
  2. Click Save settings.

Approval settings panel

In the Approval settings panel, you can configure the following fields:

Approval system


Use Approval system to select to manage approvals either within LaunchDarkly or with a third-party tool. To learn about the ServiceNow approvals integration, read ServiceNow approvals. The ServiceNow approvals integration supports approval requests for feature flag changes only.

The Approval settings panel, showing the Approval system option.
The Approval settings panel, showing the Approval system option.

Flag approvals


In the "Flag approvals" section, you can configure the following fields:

  • Require approvals for flags in this environment: Select this checkbox to require approval for flag targeting changes in this environment:
    • All flags: Select to require approval for all flag targeting changes.
    • Flags matching the following tags: Select to require approval only for flag targeting changes on flags with the listed tags. While tags are global across environments, this setting applies only to flags in the current environment.
    • Allow deleting scheduled changes without approval: Select to allow scheduled changes for a flag to be deleted without approval in this environment.
  • Automatically apply flag changes in LaunchDarkly when associated external change requests are approved: Select this checkbox to have flag changes that are approved in ServiceNow or other external approval systems automatically applied in LaunchDarkly. This option is only available if you have not selected LaunchDarkly as your Approval system.
  • Requesters can review their own request: Select this checkbox to allow anyone who makes an approval request to approve or decline that request. This allows someone who makes an approval request to apply their own change.
  • Minimum number of approvals: Enter a number to set the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.
  • Disable the option to 'Apply Changes' if any reviewers have declined a request: Select this option to prevent the requested change from being applied if any reviewer has declined their approval request.
The Approval settings panel, showing the Flag approvals section.
The Approval settings panel, showing the Flag approvals section.

Segment approvals


In the "Segment approvals" section, you can configure the following fields:

  • Require approvals for segments in this environment: Select this checkbox to require approval for segment targeting changes in this environment:
    • All segments: Select to require approval for all segment targeting changes.
    • Segments matching the following tags: Select to require approval only for segment targeting changes on segments with the listed tags. While tags are global across environments, this setting applies only to segments in this environment.
  • Requesters can review their own request: Select this checkbox to allow anyone who makes an approval request to approve or decline that request. This allows someone who makes an approval request to apply their own change.
  • Minimum number of approvals: Enter a number to set the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.
  • Disable the option to 'Apply Changes' if any reviewers have declined a request: Select this option to prevent the requested change from being applied if any reviewer has declined their approval request.
The Approval settings panel, showing the Segment approvals section.
The Approval settings panel, showing the Segment approvals section.

How required approvals work for targeting

When you select the Require approvals for this environment checkbox for either flags or segments in the "Approval settings" menu, it requires any targeting change to receive an approval before implementation.

If you enable this feature, the following behaviors change:

  • For flags,
    • When you toggle targeting on or off from the Flags list, the "Request approvals" dialog appears.
    • After any change to the flag's targeting rules, the Review and save button changes to Request approval. When you click it, the "Request approval" dialog appears.
    • On the Contexts page, when you change flag targeting for a context, the Save changes button changes to Request approval. When you click it, the "Request approval" dialog appears.
  • For segments,
    • After any change to the segment's targeting rules, the Request approval button becomes enabled. When you click it, the "Request approval" dialog appears.

For all of these changes, the flag or segment state does not change until a reviewer approves and applies the change.

How required approvals work for flag variations

Changes to flag variations take effect in all environments within your project. To determine whether an approval is required or not, LaunchDarkly aggregates all environment-level approval settings, and applies the strictest settings to the approval flow.

If at least one environment in a project requires approvals, changes to the value of a flag's variation, including deleting a variation, will be sent through a required approval workflow. Changes to variation names, descriptions, or variations that the flag isn't serving, including creating a new variation, do not require approval.

Examples of enforcing the strictest approval settings to variations changes include:

  • If one environment requires approvals and another does not, the change will require approval
  • If one environment requires one approval, and another environment requires four approvals, the change will require four approvals
  • If one environment allows members to review their own requests, and another does not allow members to review their own requests, the change cannot be reviewed by the requesting member
  • If one environment uses ServiceNow as an approval system, and another uses LaunchDarkly, the approval will be routed through ServiceNow
  • If one environment requires approvals for flags tagged "customer" and another environment requires approvals for flags tagged "beta," changes will require approvals for all flags that include either of those tags
  • If a flag serves a variation exclusively in environments that do not require approval, changes to that variation will not require approval
Creating flag variations does not require an approval

If a team member creates a new variation for a flag, they do not need an approval or to create an approval request. They can request an approval if they want to, but it is not required.

Bypass required approvals

If you want to grant workflows or members the ability to make flag changes without requesting approval, there is a custom role action that allows them to bypass the approval request process. This is helpful when you need to toggle off a flag immediately, such as during an incident or other end user-facing problem. This action is limited to the environment level, so no one with permission to bypass approval requests can make changes to your LaunchDarkly project unless otherwise allowed by their role.

The bypassRequiredApproval custom role action only applies to flag approvals. You cannot bypass required approvals for segments.

To bypass approval requirements, add the bypassRequiredApproval action to a member or service token's custom role. To learn about custom role actions, read Custom role actions.