Skip to content

Commit 3640541

Browse files
committed
r/aws_xray_indexing_rule: Add documentation.
1 parent d573404 commit 3640541

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
subcategory: "X-Ray"
3+
layout: "aws"
4+
page_title: "AWS: aws_xray_indexing_rule"
5+
description: |-
6+
Manages an AWS X-Ray indexing rule.
7+
---
8+
9+
# Resource: aws_xray_indexing_rule
10+
11+
Manages an AWS X-Ray indexing rule.
12+
13+
-> **Note:** Removing this resource from Terraform has no effect on the indedxing rule within AWS X-Ray.
14+
15+
## Example Usage
16+
17+
```terraform
18+
resource "aws_xray_indexing_rule" "example" {
19+
name = "Default"
20+
21+
rule {
22+
probabilistic {
23+
desired_sampling_percentage = 0.66
24+
}
25+
}
26+
}
27+
```
28+
29+
## Argument Reference
30+
31+
This resource supports the following arguments:
32+
33+
* `name` - (Required) Indexing rule name.
34+
* `rule` - (Required) Rule configuration. See [`rule` Block](#rule-block) below.
35+
* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference).
36+
37+
### `rule` Block
38+
39+
The `rule` block supports:
40+
41+
* `probabilistic` - (Optional) Indexing rule configuration used to probabilistically sample traceIds. See [`probabilistic` Block](#probabilistic-block) below.
42+
43+
### `probabilistic` Block
44+
45+
The `probabilistic` block supports:
46+
47+
* `desired_sampling_percentage` - (Required) Configured sampling percentage of traceIds.
48+
* `actual_sampling_percentage` - (Computed) Applied sampling percentage of traceIds.
49+
50+
## Attribute Reference
51+
52+
This resource exports no additional attributes.
53+
54+
## Import
55+
56+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
57+
58+
```terraform
59+
import {
60+
to = aws_xray_indexing_rule.example
61+
identity = {
62+
name = "Default"
63+
}
64+
}
65+
66+
resource "aws_xray_indexing_rule" "example" {
67+
### Configuration omitted for brevity ###
68+
}
69+
```
70+
71+
### Identity Schema
72+
73+
#### Required
74+
75+
* `name` (String) Indexing rule name.
76+
77+
#### Optional
78+
79+
* `account_id` (String) AWS Account where this resource is managed.
80+
* `region` (String) Region where this resource is managed.
81+
82+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import XRay Indexing Rules using `name`. For example:
83+
84+
```terraform
85+
import {
86+
to = aws_xray_indexing_rule.example
87+
id = "Default"
88+
}
89+
```
90+
91+
Using `terraform import`, import XRay Indexing Rules using `name`. For example:
92+
93+
```console
94+
% terraform import aws_xray_indexing_rule.example Default
95+
```

0 commit comments

Comments
 (0)