-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Data Source: wiz_cloud_config_rules (#28)
This change adds a new data source, wiz_cloud_config_rules, that can be used to filter and return details for Wiz Cloud Configuration Rules.
- Loading branch information
Showing
10 changed files
with
1,377 additions
and
36 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,138 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "wiz_cloud_config_rules Data Source - terraform-provider-wiz" | ||
subcategory: "" | ||
description: |- | ||
Query cloud configuration rules. | ||
--- | ||
|
||
# wiz_cloud_config_rules (Data Source) | ||
|
||
Query cloud configuration rules. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# get aws cloud configuration rules for access keys | ||
data "wiz_cloud_config_rules" "aws_access_key" { | ||
search = "Access key" | ||
cloud_provider = [ | ||
"AWS", | ||
] | ||
} | ||
# get high and critical aws cloud configuration rules that have remediation | ||
data "wiz_cloud_config_rules" "aws_critical" { | ||
cloud_provider = [ | ||
"AWS", | ||
] | ||
severity = [ | ||
"CRITICAL", | ||
"HIGH", | ||
] | ||
has_remediation = true | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `cloud_provider` (List of String) Find CSPM rules related to cloud provider. | ||
- Allowed values: | ||
- GCP | ||
- AWS | ||
- Azure | ||
- OCI | ||
- Alibaba | ||
- vSphere | ||
- OpenShift | ||
- Kubernetes | ||
- `created_by` (List of String) Search rules by user. | ||
- `enabled` (Boolean) CSPM Rule enabled status. | ||
- `first` (Number) How many results to return | ||
- Defaults to `500`. | ||
- `framework_category` (List of String) Search rules by any of securityFramework | securitySubCategory | securityCategory. | ||
- `function_as_control` (Boolean) Search by function as control. | ||
- `has_auto_remediation` (Boolean) Rule has auto remediation. | ||
- `has_remediation` (Boolean) Rule has remediation. | ||
- `ids` (List of String) GetSearch by IDs. | ||
- `is_opa_policy` (Boolean) Search by opaPolicy presence. | ||
- `matcher_type` (List of String) Search rules by target native type. | ||
- Allowed values: | ||
- CLOUD | ||
- TERRAFORM | ||
- CLOUD_FORMATION | ||
- KUBERNETES | ||
- AZURE_RESOURCE_MANAGER | ||
- DOCKER_FILE | ||
- `project` (List of String) Search by project. | ||
- `risk_equals_all` (List of String) | ||
- `risk_equals_any` (List of String) | ||
- `scope_account_ids` (List of String) Find CSPM rules applied on cloud account IDs. | ||
- `search` (String) Free text search on CSPM name or resource ID. | ||
- `service_type` (List of String) Find CSPM rules related to the service. | ||
- Allowed values: | ||
- AWS | ||
- Azure | ||
- GCP | ||
- OCI | ||
- Alibaba | ||
- AKS | ||
- EKS | ||
- GKE | ||
- Kubernetes | ||
- OKE | ||
- `severity` (List of String) CSPM Rule severity. | ||
- Allowed values: | ||
- INFORMATIONAL | ||
- LOW | ||
- MEDIUM | ||
- HIGH | ||
- CRITICAL | ||
- `subject_entity_type` (List of String) Find rules by their entity type subject. | ||
- `target_native_type` (List of String) Search rules by target native type. | ||
|
||
### Read-Only | ||
|
||
- `cloud_configuration_rules` (Set of Object) The returned cloud configuration rules. (see [below for nested schema](#nestedatt--cloud_configuration_rules)) | ||
- `id` (String) Internal identifier for the data. | ||
|
||
<a id="nestedatt--cloud_configuration_rules"></a> | ||
### Nested Schema for `cloud_configuration_rules` | ||
|
||
Read-Only: | ||
|
||
- `builtin` (Boolean) | ||
- `cloud_provider` (String) | ||
- `control_id` (String) | ||
- `description` (String) | ||
- `enabled` (Boolean) | ||
- `external_references` (Set of Object) (see [below for nested schema](#nestedobjatt--cloud_configuration_rules--external_references)) | ||
- `function_as_control` (Boolean) | ||
- `graph_id` (String) | ||
- `has_auto_remediation` (Boolean) | ||
- `iac_matcher_ids` (List of String) | ||
- `id` (String) | ||
- `name` (String) | ||
- `opa_policy` (String) | ||
- `remediation_instructions` (String) | ||
- `scope_accounts` (List of String) | ||
- `security_sub_category_ids` (List of String) | ||
- `service_type` (String) | ||
- `severity` (String) | ||
- `short_id` (String) | ||
- `subject_entity_type` (String) | ||
- `supports_nrt` (Boolean) | ||
- `target_native_types` (List of String) | ||
|
||
<a id="nestedobjatt--cloud_configuration_rules--external_references"></a> | ||
### Nested Schema for `cloud_configuration_rules.external_references` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `name` (String) | ||
|
||
|
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
19 changes: 19 additions & 0 deletions
19
examples/data-sources/wiz_cloud_config_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,19 @@ | ||
# get aws cloud configuration rules for access keys | ||
data "wiz_cloud_config_rules" "aws_access_key" { | ||
search = "Access key" | ||
cloud_provider = [ | ||
"AWS", | ||
] | ||
} | ||
|
||
# get high and critical aws cloud configuration rules that have remediation | ||
data "wiz_cloud_config_rules" "aws_critical" { | ||
cloud_provider = [ | ||
"AWS", | ||
] | ||
severity = [ | ||
"CRITICAL", | ||
"HIGH", | ||
] | ||
has_remediation = true | ||
} |
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
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
Oops, something went wrong.