Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.87 KB

File metadata and controls

62 lines (44 loc) · 1.87 KB
page_title configcat_segment Resource - terraform-provider-configcat
subcategory
description Creates and manages a Segment. What is a Segment in ConfigCat? https://configcat.com/docs/advanced/segments

configcat_segment (Resource)

Creates and manages a Segment. What is a Segment in ConfigCat?

Example Usage

variable "product_id" {
  type = string
}

resource "configcat_segment" "my_segment" {
  product_id           = var.product_id
  name                 = "Beta users"
  description          = "Beta users' description"
  comparison_attribute = "email"
  comparator           = "sensitiveIsOneOf"
  comparison_value     = "betauser1@example.com,betauser2@example.com"
}


output "segment_id" {
  value = configcat_segment.my_segment.id
}

Schema

Required

  • comparator (String) The comparator of the Segment.
  • comparison_attribute (String) The comparison attribute of the Segment.
  • comparison_value (String) The comparison value of the Segment.
  • name (String) The name of the Segment.
  • product_id (String) The ID of the Product.

Optional

  • description (String) The description of the Segment.

Read-Only

  • id (String) The unique ID of the Segment.

Import

Import is supported using the following syntax:

# Segments can be imported using the SegmentId. Get the SegmentId using the [List Segments API](https://api.configcat.com/docs/#tag/Segments/operation/get-segments) for example.

terraform import configcat_segment.example 08d86d63-2726-47cd-8bfc-59608ecb91e2