Creates and manages an AWS XRay Group.
resource "aws_xray_group" "example" {
group_name = "example"
filter_expression = "responsetime > 5"
insights_configuration {
insights_enabled = true
notifications_enabled = true
}
}
group_name
- (Required) The name of the group.filter_expression
- (Required) The filter expression defining criteria by which to group traces. more info can be found in official docs.insights_configuration
- (Optional) Configuration options for enabling insights.tags
- (Optional) Key-value mapping of resource tags. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.insights_configuration
insights_enabled
- (Required) Specifies whether insights are enabled.notifications_enabled
- (Optional) Specifies whether insight notifications are enabled.This resource exports the following attributes in addition to the arguments above:
id
- The ARN of the Group.arn
- The ARN of the Group.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.In Terraform v1.5.0 and later, use an import
block to import XRay Groups using the ARN. For example:
import {
to = aws_xray_group.example
id = "arn:aws:xray:us-west-2:1234567890:group/example-group/TNGX7SW5U6QY36T4ZMOUA3HVLBYCZTWDIOOXY3CJAXTHSS3YCWUA"
}
Using terraform import
, import XRay Groups using the ARN. For example:
% terraform import aws_xray_group.example arn:aws:xray:us-west-2:1234567890:group/example-group/TNGX7SW5U6QY36T4ZMOUA3HVLBYCZTWDIOOXY3CJAXTHSS3YCWUA