Skip to content

Commit

Permalink
Resource and Data Source Support for Custom Redirects and Filters (#113)
Browse files Browse the repository at this point in the history
* Added changes for bloxone redirect

* Added support for Filters

* Generated docs

* Fixed linter issues

* Added required fields , Schema descriptions and few minor changes

* Fixed Review Comments

* Added Threat Feeds
  • Loading branch information
unasra authored May 24, 2024
1 parent 58cc8de commit 3d5d613
Show file tree
Hide file tree
Showing 104 changed files with 16,779 additions and 8 deletions.
78 changes: 78 additions & 0 deletions docs/data-sources/td_application_filters.md
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: "bloxone_td_application_filters Data Source - terraform-provider-bloxone"
subcategory: "Threat Defense"
description: |-
Retrieves information about existing Application Filters.
---

# bloxone_td_application_filters (Data Source)

Retrieves information about existing Application Filters.

## Example Usage

```terraform
# Get Application Filters filtered by an attribute
data "bloxone_td_application_filters" "example_by_attribute" {
filters = {
"name" = "example_application_filter"
}
}
# Get Application Filters filtered by tag
data "bloxone_td_application_filters" "example_by_tag" {
tag_filters = {
"region" = "eu"
}
}
# Get all Application Filters
data "bloxone_td_application_filters" "example_all" {}
```

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

### Optional

- `filters` (Map of String) Filter are used to return a more specific list of results. Filters can be used to match resources by specific attributes, e.g. name. If you specify multiple filters, the results returned will have only resources that match all the specified filters.
- `tag_filters` (Map of String) Tag Filters are used to return a more specific list of results filtered by tags. If you specify multiple filters, the results returned will have only resources that match all the specified filters.

### Read-Only

- `results` (Attributes List) (see [below for nested schema](#nestedatt--results))

<a id="nestedatt--results"></a>
### Nested Schema for `results`

Required:

- `criteria` (Attributes List) The array of key-value pairs specifying criteria for the search. (see [below for nested schema](#nestedatt--results--criteria))
- `name` (String) The name of the application filter.

Optional:

- `description` (String) The brief description for the application filter.
- `tags` (Map of String) Enables tag support for resource where tags attribute contains user-defined key value pairs

Read-Only:

- `created_time` (String) The time when this Application Filter object was created.
- `id` (Number) The Application Filter object identifier.
- `policies` (List of String) The list of security policy names with which the application filter is associated.
- `readonly` (Boolean) True if it is a predefined application filter
- `updated_time` (String) The time when this Application Filter object was last updated.

<a id="nestedatt--results--criteria"></a>
### Nested Schema for `results.criteria`

Optional:

- `category` (String) The category of the application.
- `name` (String) Name for the application. Since the name of application is unique it may be used as alternate key for the application. The 'name' is used for import-export workflow and should be resolved to the 'id' before continue processing Create/Update operations.
- `subcategory` (String) The subcategory of the application.

Read-Only:

- `id` (String) The Application Criterion object identifier.
64 changes: 64 additions & 0 deletions docs/data-sources/td_category_filters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bloxone_td_category_filters Data Source - terraform-provider-bloxone"
subcategory: "Threat Defense"
description: |-
Retrieves information about existing Category Filters.
---

# bloxone_td_category_filters (Data Source)

Retrieves information about existing Category Filters.

## Example Usage

```terraform
# Get Category Filters filtered by an attribute
data "bloxone_td_category_filters" "example_by_attribute" {
filters = {
"name" = "example_category_filter"
}
}
# Get Category Filters filtered by tag
data "bloxone_td_category_filters" "example_by_tag" {
tag_filters = {
"region" = "eu"
}
}
# Get all Category Filters
data "bloxone_td_category_filters" "example_all" {}
```

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

### Optional

- `filters` (Map of String) Filter are used to return a more specific list of results. Filters can be used to match resources by specific attributes, e.g. name. If you specify multiple filters, the results returned will have only resources that match all the specified filters.
- `tag_filters` (Map of String) Tag Filters are used to return a more specific list of results filtered by tags. If you specify multiple filters, the results returned will have only resources that match all the specified filters.

### Read-Only

- `results` (Attributes List) (see [below for nested schema](#nestedatt--results))

<a id="nestedatt--results"></a>
### Nested Schema for `results`

Required:

- `categories` (List of String) The list of content category names that falls into this category filter.
- `name` (String) The name of the category filter.

Optional:

- `description` (String) The brief description for the category filter.
- `tags` (Map of String) Enables tag support for resource where tags attribute contains user-defined key value pairs

Read-Only:

- `created_time` (String) The time when this Category Filter object was created.
- `id` (Number) The Category Filter object identifier.
- `policies` (List of String) The list of security policy names with which the category filter is associated.
- `updated_time` (String) The time when this Category Filter object was last updated.
34 changes: 34 additions & 0 deletions docs/data-sources/td_content_categories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bloxone_td_content_categories Data Source - terraform-provider-bloxone"
subcategory: "Threat Defense"
description: |-
Retrieves information about existing Content Categories.
---

# bloxone_td_content_categories (Data Source)

Retrieves information about existing Content Categories.

## Example Usage

```terraform
# Get all Content Categories
data "bloxone_td_content_categories" "all_content_categories" {}
```

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

### Read-Only

- `results` (Attributes List) (see [below for nested schema](#nestedatt--results))

<a id="nestedatt--results"></a>
### Nested Schema for `results`

Optional:

- `category_code` (Number) The category code.
- `category_name` (String) The name of the category.
- `functional_group` (String) The functional group name of the category.
59 changes: 59 additions & 0 deletions docs/data-sources/td_custom_redirects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bloxone_td_custom_redirects Data Source - terraform-provider-bloxone"
subcategory: "Threat Defense"
description: |-
Retrieves information about existing Custom Redirects.
---

# bloxone_td_custom_redirects (Data Source)

Retrieves information about existing Custom Redirects.

## Example Usage

```terraform
# Get Custom Redirects filtered by an attribute
data "bloxone_td_custom_redirects" "example_by_attribute" {
filters = {
"name" = "example_custom_redirect"
}
}
# Get Custom Redirects filtered by tag
data "bloxone_td_custom_redirects" "example_by_tag" {
tag_filters = {
"region" = "eu"
}
}
# Get all Custom Redirects
data "bloxone_td_custom_redirects" "example_all" {}
```

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

### Optional

- `filters` (Map of String) Filter are used to return a more specific list of results. Filters can be used to match resources by specific attributes, e.g. name. If you specify multiple filters, the results returned will have only resources that match all the specified filters.

### Read-Only

- `results` (Attributes List) (see [below for nested schema](#nestedatt--results))

<a id="nestedatt--results"></a>
### Nested Schema for `results`

Required:

- `data` (String) The list of csv custom IPv4/IPv6 or a single domain redirect address.
- `name` (String) The name of the custom redirect.

Read-Only:

- `created_time` (String) The time when this Custom Redirect object was created.
- `id` (Number) The Custom Redirect object identifier.
- `policy_ids` (List of Number) The list of the security policy identifiers with which the named list is associated.
- `policy_names` (List of String) The list of the security policy names with which the custom redirect is associated.
- `updated_time` (String) The time when this Custom Redirect object was last updated.
51 changes: 51 additions & 0 deletions docs/data-sources/td_threat_feeds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bloxone_td_threat_feeds Data Source - terraform-provider-bloxone"
subcategory: "Threat Defense"
description: |-
Retrieves information about existing Threat Feeds.
---

# bloxone_td_threat_feeds (Data Source)

Retrieves information about existing Threat Feeds.

## Example Usage

```terraform
# Get Threat Feeds filtered by an attribute
data "bloxone_td_threat_feeds" "example_by_attribute" {
filters = {
"name" = "Cryptocurrency"
}
}
# Get all Threat Feeds
data "bloxone_td_threat_feeds" "example_all" {}
```

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

### Optional

- `filters` (Map of String) Filter are used to return a more specific list of results. Filters can be used to match resources by specific attributes, e.g. name. If you specify multiple filters, the results returned will have only resources that match all the specified filters.

### Read-Only

- `results` (Attributes List) (see [below for nested schema](#nestedatt--results))

<a id="nestedatt--results"></a>
### Nested Schema for `results`

Optional:

- `source` (String) The source of the threat feed.

Read-Only:

- `confidence_level` (String) The Confidence Level of the Feed.
- `description` (String) The brief description for the thread feed.
- `key` (String) The TSIG key of the threat feed.
- `name` (String) The name of the thread feed.
- `threat_level` (String) The Threat Level of the Feed.
63 changes: 63 additions & 0 deletions docs/resources/td_application_filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bloxone_td_application_filter Resource - terraform-provider-bloxone"
subcategory: "Threat Defense"
description: |-
Creates and Manages Application Filters.
---

# bloxone_td_application_filter (Resource)

Creates and Manages Application Filters.

## Example Usage

```terraform
resource "bloxone_td_application_filter" "example" {
name = "example_application_filter"
criteria = [
{
name = "Microsoft 365"
}
]
# Other optional fields
description = "Example of an Application Filter"
tags = {
site = "Site A"
}
}
```

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

### Required

- `criteria` (Attributes List) The array of key-value pairs specifying criteria for the search. (see [below for nested schema](#nestedatt--criteria))
- `name` (String) The name of the application filter.

### Optional

- `description` (String) The brief description for the application filter.
- `tags` (Map of String) Enables tag support for resource where tags attribute contains user-defined key value pairs

### Read-Only

- `created_time` (String) The time when this Application Filter object was created.
- `id` (Number) The Application Filter object identifier.
- `policies` (List of String) The list of security policy names with which the application filter is associated.
- `readonly` (Boolean) True if it is a predefined application filter
- `updated_time` (String) The time when this Application Filter object was last updated.

<a id="nestedatt--criteria"></a>
### Nested Schema for `criteria`

Optional:

- `category` (String) The category of the application.
- `name` (String) Name for the application. Since the name of application is unique it may be used as alternate key for the application. The 'name' is used for import-export workflow and should be resolved to the 'id' before continue processing Create/Update operations.
- `subcategory` (String) The subcategory of the application.

Read-Only:

- `id` (String) The Application Criterion object identifier.
Loading

0 comments on commit 3d5d613

Please sign in to comment.