Skip to content

Commit 16c9589

Browse files
committed
add docs
1 parent 76b43c4 commit 16c9589

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

sysdig/resource_sysdig_secure_rule_stateful.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,10 @@ func resourceSysdigSecureStatefulRule() *schema.Resource {
6868
Type: schema.TypeString,
6969
Required: true,
7070
},
71-
"comps": {
72-
Type: schema.TypeList,
73-
Optional: true,
74-
Elem: &schema.Schema{Type: schema.TypeString},
75-
},
7671
"values": {
7772
Type: schema.TypeString,
7873
Required: true,
7974
},
80-
"fields": {
81-
Type: schema.TypeList,
82-
Optional: true,
83-
Elem: &schema.Schema{Type: schema.TypeString},
84-
},
8575
},
8676
},
8777
},
@@ -125,8 +115,6 @@ func resourceSysdigRuleStatefulRead(ctx context.Context, d *schema.ResourceData,
125115
return diag.FromErr(err)
126116
}
127117

128-
// for stateful rules, we'll need to get the rule group
129-
130118
nameObj, ok := d.GetOk("name")
131119
if !ok {
132120
return diag.FromErr(errors.New("name is required"))
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
subcategory: "Sysdig Secure"
3+
layout: "sysdig"
4+
page_title: "Sysdig: sysdig_secure_rule_stateful"
5+
description: |-
6+
Retrieves a Sysdig Secure Stateful Rule.
7+
---
8+
9+
# Data Source: sysdig_secure_rule_stateful
10+
11+
Retrieves the information of an existing Sysdig Secure Stateful Rule.
12+
13+
-> **Note:** Sysdig Terraform Provider is under rapid development at this point. If you experience any issue or discrepancy while using it, please make sure you have the latest version. If the issue persists, or you have a Feature Request to support an additional set of resources, please open a [new issue](https://github.com/sysdiglabs/terraform-provider-sysdig/issues/new) in the GitHub repository.
14+
15+
## Example Usage
16+
17+
```terraform
18+
data "sysdig_secure_rule_stateful" "example" {
19+
name = "Access Key Enumeration Detected"
20+
source = "awscloudtrail_stateful"
21+
ruletype = "STATEFUL_SEQUENCE"
22+
}
23+
```
24+
25+
## Argument Reference
26+
27+
* `name` - (Required) The name of the Secure rule to retrieve.
28+
* `source` - (Required) The source of the Secure rule to retrieve.
29+
* `ruletype` - (Required) The type of the Secure rule to retrieve.
30+
31+
## Attributes Reference
32+
33+
In addition to the argument above, the following attributes are exported:
34+
35+
* `exceptions` - The exceptions key is a list of identifier plus list of tuples of filtercheck fields. See below for details.
36+
* `append` - This indicates that the rule being created appends the condition to an existing Sysdig-provided rule
37+
38+
### Exceptions
39+
40+
Stateful rules support an optional exceptions property to rules. The exceptions key is a list of identifier plus list of tuples of filtercheck fields.
41+
42+
Supported fields for exceptions:
43+
44+
* `name` - The name of the existing exception definition.
45+
* `values` - Contains tuples of values. Each item in the tuple should align 1-1 with the corresponding field
46+
and comparison operator.
47+

0 commit comments

Comments
 (0)