Skip to content

[⚠️ UNDER CONSTRUCTION] 🚩 A Terraform Provider to manage Flagr with IaC

License

Notifications You must be signed in to change notification settings

openflagr/terraform-provider-flagr

Repository files navigation

Flagr Terraform Provider

<>

Welcome to the Flagr Terraform provider! With this provider you can create and manage your flags on flagr!

To view the full documentation of this provider, we recommend checking the Terraform Registry - Coming soon!

Usage

⚠️ The usage represents, as of now, the desired state, not the current state. Below, you are able to see supported features in the feature matrix.

terraform {
  required_providers {
    flagr = {
      source  = "openflagr/flagr"
      version = "1.0.0"
    }
  }
}

provider "flagr" {
  ## Flagr Host
  host = "http://flagr.yourdomain.com:18000"

  ## Flagr Path - Optional, in case your flagr API runs on a custom path
  # path = "/api/v1"

  ## Flagr Authentication - Optional, in case your flagr API runs authenticated
  ## authentication = "..."
}

# Example key for a release of a new pricing algorithm
resource "flagr_flag" "pricing-algorithm-v2" {
  description = "Price Algorithm V2"

  enabled              = true
  data_records_enabled = true

  variant {
    key        = "pricing:v1"
    attachment = "pricing:v1"
  }

  variant {
    key        = "pricing:v2"
    attachment = "pricing:v2"
  }

  segments {
    description  = "All traffic"
    rollout      = 100
    distribution = {
        "pricing:v1" = 90
        "pricing:v2" = 10
    }
  }
}

The example above represents a release of a pricing algorithm, it will split the traffic in 2 parts, 90% gets the regular/existing pricing variant (v1) and 10% gets the new pricing (v2).

Releases

Coming soon!

Compatibility Matrix

Target Provider Version
0.0.0
openflagr/flagr:1.1.13
openflagr/flagr:1.1.12
checkr/flagr:1.1.12

Features

For more insights into what each entity means, please reffer to openflagr-docs.

Terraform Entity Feature Status
Provider URL
Path
Authentication ⚪️
Data Source Flags ReadAll
Search ⛔️
Flag Read (id)
Search ⛔️
Variants ReadAll (flag-id) ⛔️
Variant Read (flag-id/id) ⛔️
Segments ReadAll (flag-id) ⛔️
Segment Read (flag-id/id) ⛔️
Resource Flag Read
Import
Create
Update
Delete
Resource Variant Read ⚪️
Import ⚪️
Create ⚪️
Update ⚪️
Delete ⚪️
Resource Segment Read ⚪️
Import ⚪️
Create ⚪️
Update ⚪️
Delete ⚪️
  • ✅ - Supported
  • ⚠️ - Partially supported / not stable
  • ⚪️ - Not Supported but part of the roadmap
  • ⛔️ - Not Supported & no plans for now

Maintainers

This provider plugin is maintained by the OpenFlagr team.

Contributing

Read our contributors guide for more info on contributing.

About

[⚠️ UNDER CONSTRUCTION] 🚩 A Terraform Provider to manage Flagr with IaC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published