| 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 |
Creates and manages a Segment. What is a Segment in ConfigCat?
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
}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.
description(String) The description of the Segment.
id(String) The unique ID of the Segment.
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