Skip to content

Commit

Permalink
added example and generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cvirtucio committed Dec 6, 2023
1 parent dacd275 commit 5927b92
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
77 changes: 77 additions & 0 deletions docs/resources/report_graph_query.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "wiz_report_graph_query Resource - terraform-provider-wiz"
subcategory: ""
description: |-
TBD.
---

# wiz_report_graph_query (Resource)

TBD.

## Example Usage

```terraform
# A simple example
resource "wiz_report_graph_query" "foo" {
name = "foo"
project_id = "2c38b8fa-c315-57ea-9de4-e3a19592d796"
query = <<EOF
{
"select": true,
"type": [
"CONTAINER_IMAGE"
],
"where": {
"name": {
"CONTAINS": [
"foo"
]
}
}
}
EOF
}
# Scheduling enabled (both run_interval_hours and run_starts_at must be set)
resource "wiz_report_graph_query" "foo" {
name = "foo"
project_id = "2c38b8fa-c315-57ea-9de4-e3a19592d796"
run_interval_hours = 24
run_starts_at = "2023-12-06 16:30:00 +0000 UTC"
query = <<EOF
{
"select": true,
"type": [
"CONTAINER_IMAGE"
],
"where": {
"name": {
"CONTAINS": [
"foo"
]
}
}
}
EOF
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Name of the Report.
- `project_id` (String) The ID of the project that this report belongs to.
- `query` (String) The query that the report will run. Required by the GRAPH_QUERY report type.

### Optional

- `run_interval_hours` (Number) Run interval for scheduled reports (in hours).
- `run_starts_at` (String) String representing the time and date when the scheduling should start (required when run_interval_hours is set). Must be in the following format: 2006-01-02 15:04:05 +0000 UTC

### Read-Only

- `id` (String) The ID of this resource.
43 changes: 43 additions & 0 deletions examples/resources/wiz_report_graph_query/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# A simple example
resource "wiz_report_graph_query" "foo" {
name = "foo"
project_id = "2c38b8fa-c315-57ea-9de4-e3a19592d796"
query = <<EOF
{
"select": true,
"type": [
"CONTAINER_IMAGE"
],
"where": {
"name": {
"CONTAINS": [
"foo"
]
}
}
}
EOF
}

# Scheduling enabled (both run_interval_hours and run_starts_at must be set)
resource "wiz_report_graph_query" "foo" {
name = "foo"
project_id = "2c38b8fa-c315-57ea-9de4-e3a19592d796"
run_interval_hours = 24
run_starts_at = "2023-12-06 16:30:00 +0000 UTC"
query = <<EOF
{
"select": true,
"type": [
"CONTAINER_IMAGE"
],
"where": {
"name": {
"CONTAINS": [
"foo"
]
}
}
}
EOF
}

0 comments on commit 5927b92

Please sign in to comment.