Onboarding to views
This feature is for Early Access Program customers only
Views are under active development and are only available to members of LaunchDarkly’s Early Access Program (EAP). To request access to this feature, contact your LaunchDarkly account manager.
Overview
This topic explains how to start using views. Views are resources to logically organize flags and flag access within your projects.
You can use views to group flags according to the teams in your organization and the features they work on. A flag can be linked to more than one view.
Benefits of using views
The benefits of using views include:
- Consistency and security: Views allow you to organize and control access to sets of flags within a single project.
- Reduced complexity: When you restrict access to sets of flags, members of your organization can focus on just the flags they work with. You can have multiple views per project, which means you can give multiple sets of developers access to some of the same flags if needed.
- Improved scalability: Many organizations depend on the benefits of having all of their flags in a single project. For instance, using flag prerequisites requires all flags in a dependency chain to be in the same project. Using views means you can continue to use a single project, while limiting access to flags within that project.
Prerequisites
Before you can use views, you must contact your LaunchDarkly account manager and request to join the Early Access Program (EAP).
Members with an Admin, Owner, or Writer base role then automatically have access to creating and managing views. After you create the views you want in each project, you can create roles that assign access within the project based on each view.
Create views
We recommend having one member, such as an architect or tech lead, create views for a given project.
To create a new view and link flags to it:
-
Click the project dropdown. The project menu appears.
-
Select Project settings.
-
Select Views. The Views list appears:
The Views list in project settings. -
Click Create view. The “Create view” dialog appears:
The "Create view" dialog. -
Enter a unique, human-readable Name for the view.
-
(Optional) Update the view Key. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
-
(Optional) Enter a Description.
-
(Optional) Click Add tags. Enter a tag name to search for an existing tag or create a new one with that name.
-
(Optional) Click Choose maintainer to set the maintainer of the view.
-
Click Create & link flags. The “Link flags” dialog appears.
-
Check the flags that you want to include in the view.
-
Click Update linked flags.
You can also create a view and then link flags later. Follow steps 1-9 in the procedure above, and then click Create view & close.
Assign access based on views
We recommend assigning most members, such as software engineers and product managers, access to the flags they need based on the view that the flags are linked to.
To assign access to flags in a particular view, create a role with access to all actions on flags in that view and project.
Here’s an example:
If you use views to restrict access to sets of flags, it may be helpful to require that flags are associated with a view. One way to enforce this is to create a role that allows the createFlag
action only within a particular view.
Here’s an example:
Use views from the flags list
From the Flags list in the LaunchDarkly UI, you can use the View menu to show only flags that are linked to selected views:
Manage views with Terraform
There is a beta version of the LaunchDarkly Terraform provider available to manage your views via Terraform. You can view documentation for the EAP-specific version of the provider on the preview
feature branch of the repository.
To install and use the beta version of the Terraform provider:
-
Download the executable for your system from the pre-release on the provider repository.
-
Create a
~/.terraform.d/plugins
folder. -
Copy the executable file to
~/.terraform.d/plugins
. -
Create a
/.terraformrc
file and populate it with the following:.terraformrc file for beta version of the Terraform provider -
(Optional) Run
terraform init -reconfigure
from the folder containing your Terraform configuration. -
Run
terraform plan
orterraform apply
.
Provider executable security
You may need to confirm that you trust the provider executable depending on your security settings.
Next steps
For additional information on managing views, read Views. To learn more about creating roles, read Creating roles and policies.