Configuring approvals by environment
Read time: 4 minutes
Last edited: Feb 27, 2023
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.
This topic explains how to customize how approval requests work for each environment in your LaunchDarkly project. You can also require approvals on flag-level changes in any environment.
For example, you can prevent a proposed change from being applied 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.
Configuring 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.
To configure approvals by environment:
- Navigate to the Account settings page.
- Click the Projects tab.
- Click the name of the project you would like to configure approvals for. The Environments tab appears.
- Next to the environment you wish to modify, click the overflow menu.
- Choose "Approval settings":
- 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.
- 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.
- 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:
Requiring approvals in an environment
You can require any change made to a flag in this environment to go through an approval process. This creates a workflow where any environment-specific flag change must have a reviewer's approval before it can be implemented.
To require approvals on flag changes:
Navigate to the Account settings page.
Click the Projects tab.
Click the name of the project you would like to configure approvals for. The Environments tab appears.
Next to the environment you wish to modify, click the overflow menu.
Choose "Approval settings":
Select the Require approvals for this environment checkbox:
Choose whether to require approvals for all flags, or just flags with specific tags.
Choose whether to allow members to delete previously approved scheduled changes without an approval.
Choose whether requestors can approve or decline their own requests.
Enter a minimum number of approvals required.
Click Save settings.
Understanding how required approvals work
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 a flag on or off from the flags list, the "Request approvals" dialog appears.
- After any change to flag configuration on the flag's Targeting tab, 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.
Approval workflows only impact flag targeting settings within an environment. When you select the Require approvals for this environment checkbox, project-level flag changes are not included.
The following actions do not trigger an approval request:
- Changes to the flag's name
- Changes to the flag's maintainer
- Changes to the flag's description
- Changes to the flag's tags
- Changes to the flag's variations
- Creating a flag
- Archiving a flag
- Deleting a flag
To prevent members from making these kinds of changes, you can configure and assign custom roles that deny these actions. To learn how, read Custom roles.
Bypassing 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.