Resource: aws_evidently_segment

Provides a CloudWatch Evidently Segment resource.

Example Usage

Basic

resource "aws_evidently_segment" "example" {
  name    = "example"
  pattern = "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}"

  tags = {
    "Key1" = "example Segment"
  }
}

With JSON object in pattern

resource "aws_evidently_segment" "example" {
  name    = "example"
  pattern = <<JSON
  {
    "Price": [
      {
        "numeric": [">",10,"<=",20]
      }
    ]
  }
  JSON

  tags = {
    "Key1" = "example Segment"
  }
}
  {
    "Price": [
      {
        "numeric": [">",10,"<=",20]
      }
    ]
  }
  JSON

  tags = {
    "Key1" = "example Segment"
  }
}

With Description

resource "aws_evidently_segment" "example" {
  name        = "example"
  pattern     = "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}"
  description = "example"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import CloudWatch Evidently Segment using the arn. For example:

import {
  to = aws_evidently_segment.example
  id = "arn:aws:evidently:us-west-2:123456789012:segment/example"
}

Using terraform import, import CloudWatch Evidently Segment using the arn. For example:

% terraform import aws_evidently_segment.example arn:aws:evidently:us-west-2:123456789012:segment/example