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

GIVE DOCS FEEDBACK

Flag templates

Read time: 4 minutes
Last edited: Mar 13, 2024

Overview

This topic explains the different types of flags available in LaunchDarkly, and how to customize flag templates. Flag templates are project-wide default settings for different types of flags.

Modifying flag templates

Modifying flag templates is an Admin-only feature

You can only modify flag templates if you're a LaunchDarkly Admin or Owner. If you need to make changes to one flag, you may be able to make the changes you need in the flag's Settings tab. To learn more, read Other flag settings.

LaunchDarkly projects have groups of default settings, called "templates," for each type of flag. When you create a flag from a template, that template's default settings appear as pre-set configuration options.

You can modify default flag templates. LaunchDarkly applies those default settings to new flags of the same template type within the project. Updated default settings only apply to flags created after you modified the default settings. If you change a flag template's default settings, LaunchDarkly does not retroactively apply the new defaults to existing flags.

To modify a flag template:

  1. Navigate to the Account settings page.
  2. Click into the Projects tab, then the Flags tab. The template for each type of flag appears.
  3. In the "Global Settings" section, select the SDKs using Mobile Key and SDKs using Client-Side ID checkboxes to determine whether new flags should be available to mobile and/or client-side SDKs.
  4. Click Edit on the flag template you wish to modify and follow the section for that flag template:

Custom flag template settings

This section lets you customize the default template settings for custom flags. Here's how:

  1. Click Edit to make the flag template settings configurable.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Release flag template settings

This section lets you customize the default template settings for release flags. Here's how:

  1. Click Edit to make the flag template settings configurable.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Kill switch flag template settings

This section lets you customize the default template settings for kill switch flags. Here's how:

  1. Click Edit to make the flag template settings configurable.
  2. Choose Yes or No to mark all flags of this template type as temporary or permanent.
  3. In the "Variations" section, edit the flag variation Names.
  4. In the "Default variations" section, choose which default variations to serve when the flag is toggled On or Off.
  5. In the "Tags" section, type to add tags to each new flag by default.
  6. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Experiment flag template settings

This section lets you customize the default template settings for experiment flags. Here's how:

  1. Click Edit to make the flag template settings configurable.
  2. In the "Tags" section, type to add tags to each new flag by default.
  3. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Migration flag template settings

This section lets you customize the default template settings for migration flags. Here's how:

  1. Click Edit to make the flag template settings configurable.
  2. In the "Tags" section, type to add tags to each new flag by default.
  3. Click Save.

Verify that the updated default template settings are correct by navigating to the Feature flags list and creating a new flag of this template type.

Here are the topics in this category:

  • Kill switch flags
  • Release flags
  • Experiment flags
  • Migration flags
  • Custom flags