Resource: aws_evidently_feature

Provides a CloudWatch Evidently Feature resource.

Example Usage

Basic

resource "aws_evidently_feature" "example" {
  name        = "example"
  project     = aws_evidently_project.example.name
  description = "example description"

  variations {
    name = "Variation1"
    value {
      string_value = "example"
    }
  }

  tags = {
    "Key1" = "example Feature"
  }
}

With default variation

resource "aws_evidently_feature" "example" {
  name              = "example"
  project           = aws_evidently_project.example.name
  default_variation = "Variation2"

  variations {
    name = "Variation1"
    value {
      string_value = "exampleval1"
    }
  }

  variations {
    name = "Variation2"
    value {
      string_value = "exampleval2"
    }
  }
}

With entity overrides

resource "aws_evidently_feature" "example" {
  name    = "example"
  project = aws_evidently_project.example.name

  entity_overrides = {
    test1 = "Variation1"
  }

  variations {
    name = "Variation1"
    value {
      string_value = "exampleval1"
    }
  }

  variations {
    name = "Variation2"
    value {
      string_value = "exampleval2"
    }
  }
}

With evaluation strategy

resource "aws_evidently_feature" "example" {
  name                = "example"
  project             = aws_evidently_project.example.name
  evaluation_strategy = "ALL_RULES"

  entity_overrides = {
    test1 = "Variation1"
  }

  variations {
    name = "Variation1"
    value {
      string_value = "exampleval1"
    }
  }
}

Argument Reference

This resource supports the following arguments:

variations

The variations block supports the following arguments:

value

The value block supports the following arguments:

Timeouts

Configuration options:

Attribute Reference

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

evaluation_rules

The evaluation_rules block supports the following attributes:

Import

In Terraform v1.5.0 and later, use an import block to import CloudWatch Evidently Feature using the feature name and name or arn of the hosting CloudWatch Evidently Project separated by a :. For example:

import {
  to = aws_evidently_feature.example
  id = "exampleFeatureName:arn:aws:evidently:us-east-1:123456789012:project/example"
}

Using terraform import, import CloudWatch Evidently Feature using the feature name and name or arn of the hosting CloudWatch Evidently Project separated by a :. For example:

% terraform import aws_evidently_feature.example exampleFeatureName:arn:aws:evidently:us-east-1:123456789012:project/example