Provides a CloudWatch Evidently Feature resource.
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"
}
}
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"
}
}
}
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"
}
}
}
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"
}
}
}
This resource supports the following arguments:
default_variation
- (Optional) The name of the variation to use as the default variation. The default variation is served to users who are not allocated to any ongoing launches or experiments of this feature. This variation must also be listed in the variations
structure. If you omit default_variation
, the first variation listed in the variations
structure is used as the default variation.description
- (Optional) Specifies the description of the feature.entity_overrides
- (Optional) Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.evaluation_strategy
- (Optional) Specify ALL_RULES
to activate the traffic allocation specified by any ongoing launches or experiments. Specify DEFAULT_VARIATION
to serve the default variation to all users instead.name
- (Required) The name for the new feature. Minimum length of 1
. Maximum length of 127
.project
- (Required) The name or ARN of the project that is to contain the new feature.tags
- (Optional) Tags to apply to the feature. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.variations
- (Required) One or more blocks that contain the configuration of the feature's different variations. Detailed belowvariations
The variations
block supports the following arguments:
name
- (Required) The name of the variation. Minimum length of 1
. Maximum length of 127
.value
- (Required) A block that specifies the value assigned to this variation. Detailed belowvalue
The value
block supports the following arguments:
bool_value
- (Optional) If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.double_value
- (Optional) If this feature uses the double integer variation type, this field contains the double integer value of this variation.long_value
- (Optional) If this feature uses the long variation type, this field contains the long value of this variation. Minimum value of -9007199254740991
. Maximum value of 9007199254740991
.string_value
- (Optional) If this feature uses the string variation type, this field contains the string value of this variation. Minimum length of 0
. Maximum length of 512
.create
- (Default 2m
)delete
- (Default 2m
)update
- (Default 2m
)This resource exports the following attributes in addition to the arguments above:
arn
- The ARN of the feature.created_time
- The date and time that the feature is created.evaluation_rules
- One or more blocks that define the evaluation rules for the feature. Detailed belowid
- The feature name
and the project name
or arn
separated by a colon (:
).last_updated_time
- The date and time that the feature was most recently updated.status
- The current state of the feature. Valid values are AVAILABLE
and UPDATING
.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.value_type
- Defines the type of value used to define the different feature variations. Valid Values: STRING
, LONG
, DOUBLE
, BOOLEAN
.evaluation_rules
The evaluation_rules
block supports the following attributes:
name
- The name of the experiment or launch.type
- This value is aws.evidently.splits
if this is an evaluation rule for a launch, and it is aws.evidently.onlineab
if this is an evaluation rule for an experiment.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