-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(suppression_rules): Add documentation and examples
Add suppression rule docs and examples Changelog: Added
- Loading branch information
Showing
5 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "aquasec_suppression_rules Data Source - terraform-provider-aquasec" | ||
subcategory: "" | ||
description: |- | ||
Fetches the list of suppression rules. | ||
--- | ||
|
||
# aquasec_suppression_rules (Data Source) | ||
|
||
Fetches the list of suppression rules. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# List all suppression rules. | ||
data "aquasec_suppression_rules" "suppression_rules" {} | ||
output "suppression_rules" { | ||
value = { for rule in data.aquasec_suppression_rules.suppression_rules.suppression_rules : rule.id => rule.name } | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Read-Only | ||
|
||
- `suppression_rules` (Attributes List) (see [below for nested schema](#nestedatt--suppression_rules)) | ||
|
||
<a id="nestedatt--suppression_rules"></a> | ||
### Nested Schema for `suppression_rules` | ||
|
||
Read-Only: | ||
|
||
- `application_scopes` (List of String) List of application scopes for the suppression rule. | ||
- `author` (String) Author of the suppression rule. | ||
- `comment` (String) Comment for the suppression rule. | ||
- `created` (String) Creation date of the suppression rule. | ||
- `expiry` (Number) Expiry in days of the suppression rule. | ||
- `fix_available` (String) Fix available for the suppression rule. | ||
- `id` (Number) Identifier used by AquaSec to identify the suppression rule. | ||
- `name` (String) Name of the suppression rule. | ||
- `scope` (Attributes) Scope of the suppression rule. (see [below for nested schema](#nestedatt--suppression_rules--scope)) | ||
- `score` (List of Number) List of scores for the suppression rule. | ||
- `severity` (String) Severity of the suppression rule. | ||
- `status` (Boolean) Status of the suppression rule. | ||
- `vulnerabilities` (String) Vulnerabilities as comma separated list for the suppression rule. | ||
|
||
<a id="nestedatt--suppression_rules--scope"></a> | ||
### Nested Schema for `suppression_rules.scope` | ||
|
||
Read-Only: | ||
|
||
- `expression` (String) Expression of the suppression rule. | ||
- `variables` (Attributes List) Variables of the suppression rule. (see [below for nested schema](#nestedatt--suppression_rules--scope--variables)) | ||
|
||
<a id="nestedatt--suppression_rules--scope--variables"></a> | ||
### Nested Schema for `suppression_rules.scope.variables` | ||
|
||
Read-Only: | ||
|
||
- `attribute` (String) Attribute of the variable. | ||
- `name` (String) Name of the variable. | ||
- `value` (String) Value of the variable. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "aquasec_suppression_rule Resource - terraform-provider-aquasec" | ||
subcategory: "" | ||
description: |- | ||
Manages a suppression rule. | ||
--- | ||
|
||
# aquasec_suppression_rule (Resource) | ||
|
||
Manages a suppression rule. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Manage example suppression rule | ||
resource "aquasec_suppression_rule" "example" { | ||
name = "Example Suppression Rule" | ||
application_scopes = ["Global"] | ||
score = [] | ||
fix_available = false | ||
comment = "This is an example suppression rule" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `application_scopes` (List of String) List of application scopes for the suppression rule. | ||
- `comment` (String) Comment for the suppression rule. | ||
- `name` (String) Name of the suppression rule. | ||
|
||
### Optional | ||
|
||
- `expiry` (Number) Expiry in days of the suppression rule. | ||
- `fix_available` (String) Fix available for the suppression rule. | ||
- `scope` (Attributes) Scope of the suppression rule. (see [below for nested schema](#nestedatt--scope)) | ||
- `score` (List of Number) List of scores for the suppression rule. | ||
- `severity` (String) Severity of the suppression rule. | ||
- `status` (Boolean) Activation status of the suppression rule. | ||
- `vulnerabilities` (String) Vulnerabilities for the suppression rule. | ||
|
||
### Read-Only | ||
|
||
- `author` (String) Author of the suppression rule. | ||
- `created` (String) Creation date of the suppression rule. | ||
- `id` (String) Numeric identifier of the suppression rule. | ||
|
||
<a id="nestedatt--scope"></a> | ||
### Nested Schema for `scope` | ||
|
||
Optional: | ||
|
||
- `expression` (String) Expression of the suppression rule. | ||
- `variables` (Attributes List) (see [below for nested schema](#nestedatt--scope--variables)) | ||
|
||
<a id="nestedatt--scope--variables"></a> | ||
### Nested Schema for `scope.variables` | ||
|
||
Required: | ||
|
||
- `attribute` (String) Attribute of the variable. | ||
- `value` (String) Value of the variable. | ||
|
||
Optional: | ||
|
||
- `name` (String) Name of the variable. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Suppression rule can be imported by specifying the numeric identifier. | ||
terraform import aquasec_suppression_rule.example 123 | ||
``` |
6 changes: 6 additions & 0 deletions
6
examples/data-sources/aquasec_suppression_rules/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# List all suppression rules. | ||
data "aquasec_suppression_rules" "suppression_rules" {} | ||
|
||
output "suppression_rules" { | ||
value = { for rule in data.aquasec_suppression_rules.suppression_rules.suppression_rules : rule.id => rule.name } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Suppression rule can be imported by specifying the numeric identifier. | ||
terraform import aquasec_suppression_rule.example 123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Manage example suppression rule | ||
resource "aquasec_suppression_rule" "example" { | ||
name = "Example Suppression Rule" | ||
application_scopes = ["Global"] | ||
score = [] | ||
fix_available = false | ||
comment = "This is an example suppression rule" | ||
} |