Contents

Terraform provider

Manage Launch projects, environments, flags and segments with Terraform.

How it works

  • Create a server API key with launch:manage as an admin.
  • Resources cover projects, environments, flags and segments, with data sources for projects and flags. After every write the provider reads the object back, so id and server defaults are known in state.
  • Import every resource by key. Nested resources use <project-key>/<resource-key>.
  • Flag targeting is optional. Omit targeting_json to keep targeting in the dashboard; set it together with environment_id to manage one environment's targeting.
  • JSON attributes are compared by value, so reformatting a jsonencode() or a different key order is not a change.
  • An environment that requires approval holds a targeting change. The provider records the change request id in pending_change_id. A held update keeps the previously applied targeting in state and fails the apply with that id; a held create keeps the new flag and warns.
  • A resource deleted outside Terraform is removed from state on the next refresh. An environment that requires approval, or a project that has one, cannot be deleted with an API key.
resource "evolve_launch_flag" "checkout" {
  project_key = "shop"
  key         = "checkout.new"
  name        = "New checkout"
  type        = "boolean"
  variations_json = jsonencode([
    { key = "off", value = false },
    { key = "on", value = true }
  ])
}

Read the Launch overview or the SDK guides.

We use only essential cookies to keep you signed in and the app working. With your consent we may enable optional analytics to help us improve e-volv. See our Privacy Policy and Terms.