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

GIVE DOCS FEEDBACK

Configuring approvals for an environment

Read time: 6 minutes
Last edited: Jun 05, 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 in any environment.

Requiring approvals by environment is an Enterprise feature

Requiring approvals by environment 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 the Approval settings menu.

In this menu, 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, 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 dropdown.
The project dropdown.
  1. Click Environments. The Environments list appears.
  2. Click on the overflow menu next to the environment you would like to configure approvals for.
  3. Choose Approval settings:
An environment's overflow menu, with the "Approval settings" option called out.
An environment's overflow menu, with the "Approval settings" option called out.
  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.

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

  • Approval system: Select to manage approvals either within LaunchDarkly or with a third-party tool. To learn about the ServiceNow approvals integration, read ServiceNow approvals.
  • Require approvals for 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.
  • 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.
The "Approval settings" panel.

How required approvals work for flag targeting

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

If you enable this feature, the following behaviors change:

  • 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 all three of these changes, the flag 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.

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.