Resource: aws_xray_sampling_rule

Creates and manages an AWS XRay Sampling Rule.

Example Usage

resource "aws_xray_sampling_rule" "example" {
  rule_name      = "example"
  priority       = 9999
  version        = 1
  reservoir_size = 1
  fixed_rate     = 0.05
  url_path       = "*"
  host           = "*"
  http_method    = "*"
  service_type   = "*"
  service_name   = "*"
  resource_arn   = "*"

  attributes = {
    Hello = "Tris"
  }
}

Argument Reference

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 XRay Sampling Rules using the name. For example:

import {
  to = aws_xray_sampling_rule.example
  id = "example"
}

Using terraform import, import XRay Sampling Rules using the name. For example:

% terraform import aws_xray_sampling_rule.example example