Skip to content

Commit

Permalink
Add advanced inspection profile policy definition resource and data s…
Browse files Browse the repository at this point in the history
…ource (#96)
  • Loading branch information
seconroy authored Oct 18, 2023
1 parent 793599a commit 294fa7e
Show file tree
Hide file tree
Showing 15 changed files with 907 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- BREAKING CHANGE: Rename `group` attribute of `sdwan_cedge_aaa_feature_template` resource and data source to `groups` and fix type
- Use type `Set` for `device_types` attributes of feature template resources and data sources
- Add `sdwan_tls_ssl_decryption_policy_definition` resource and data source
- Add `sdwan_advanced_inspection_profile_policy_definition` resource and data source

## 0.2.8

Expand Down
41 changes: 41 additions & 0 deletions docs/data-sources/advanced_inspection_profile_policy_definition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "sdwan_advanced_inspection_profile_policy_definition Data Source - terraform-provider-sdwan"
subcategory: "Security Policies"
description: |-
This data source can read the Advanced Inspection Profile Policy Definition .
---

# sdwan_advanced_inspection_profile_policy_definition (Data Source)

This data source can read the Advanced Inspection Profile Policy Definition .

## Example Usage

```terraform
data "sdwan_advanced_inspection_profile_policy_definition" "example" {
id = "f6b2c44c-693c-4763-b010-895aa3d236bd"
}
```

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

### Required

- `id` (String) The id of the object

### Read-Only

- `advanced_malware_protection_id` (String) Advanced malware protection ID
- `advanced_malware_protection_version` (Number) Advanced malware protection version
- `description` (String) The description of the policy definition.
- `intrusion_prevention_id` (String) Intrusion prevention ID (unified mode)
- `intrusion_prevention_version` (Number) Intrusion prevention version
- `name` (String) The name of the policy definition.
- `tls_action` (String) TLS Action
- `tls_ssl_decryption_id` (String) TLS/SSL decryption ID
- `tls_ssl_decryption_version` (Number) TLS/SSL decryption version
- `url_filtering_id` (String) URL filtering ID (unified mode)
- `url_filtering_version` (Number) URL filtering version
- `version` (Number) The version of the object
21 changes: 11 additions & 10 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
subcategory: "Guides"
page_title: "Changelog"
description: |-
Changelog
---

# Changelog

---
subcategory: "Guides"
page_title: "Changelog"
description: |-
Changelog
---

# Changelog

## 0.2.9 (unreleased)

- Add `sdwan_advanced_malware_protection_policy_definition` resource and data source
- BREAKING CHANGE: Rename `group` attribute of `sdwan_cedge_aaa_feature_template` resource and data source to `groups` and fix type
- Use type `Set` for `device_types` attributes of feature template resources and data sources
- Add `sdwan_tls_ssl_decryption_policy_definition` resource and data source
- Add `sdwan_advanced_inspection_profile_policy_definition` resource and data source

## 0.2.8

Expand Down Expand Up @@ -87,4 +88,4 @@ description: |-
## 0.1.0 (July 23, 2021)

- Initial Release


56 changes: 56 additions & 0 deletions docs/resources/advanced_inspection_profile_policy_definition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "sdwan_advanced_inspection_profile_policy_definition Resource - terraform-provider-sdwan"
subcategory: "Security Policies"
description: |-
This resource can manage a Advanced Inspection Profile Policy Definition .
---

# sdwan_advanced_inspection_profile_policy_definition (Resource)

This resource can manage a Advanced Inspection Profile Policy Definition .

## Example Usage

```terraform
resource "sdwan_advanced_inspection_profile_policy_definition" "example" {
name = "Example"
description = "My description"
tls_action = "decrypt"
url_filtering_id = "914670a3-9726-4a51-847f-b3db70819dc2"
}
```

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

### Required

- `description` (String) The description of the policy definition.
- `name` (String) The name of the policy definition.

### Optional

- `advanced_malware_protection_id` (String) Advanced malware protection ID
- `advanced_malware_protection_version` (Number) Advanced malware protection version
- `intrusion_prevention_id` (String) Intrusion prevention ID (unified mode)
- `intrusion_prevention_version` (Number) Intrusion prevention version
- `tls_action` (String) TLS Action
- Choices: `decrypt`, `skipDecrypt`, `doNotDecrypt`
- `tls_ssl_decryption_id` (String) TLS/SSL decryption ID
- `tls_ssl_decryption_version` (Number) TLS/SSL decryption version
- `url_filtering_id` (String) URL filtering ID (unified mode)
- `url_filtering_version` (Number) URL filtering version

### Read-Only

- `id` (String) The id of the object
- `version` (Number) The version of the object

## Import

Import is supported using the following syntax:

```shell
terraform import sdwan_advanced_inspection_profile_policy_definition.example "f6b2c44c-693c-4763-b010-895aa3d236bd"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "sdwan_advanced_inspection_profile_policy_definition" "example" {
id = "f6b2c44c-693c-4763-b010-895aa3d236bd"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import sdwan_advanced_inspection_profile_policy_definition.example "f6b2c44c-693c-4763-b010-895aa3d236bd"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "sdwan_advanced_inspection_profile_policy_definition" "example" {
name = "Example"
description = "My description"
tls_action = "decrypt"
url_filtering_id = "914670a3-9726-4a51-847f-b3db70819dc2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Advanced Inspection Profile Policy Definition
rest_endpoint: /template/policy/definition/advancedinspectionprofile/
has_version: true
id_attribute: definitionId
doc_category: Security Policies
attributes:
- model_name: type
type: String
value: advancedInspectionProfile
- model_name: name
tf_name: name
type: String
mandatory: true
description: The name of the policy definition.
example: Example
- model_name: description
tf_name: description
type: String
mandatory: true
description: The description of the policy definition.
example: My description
- model_name: tlsDecryptionAction
data_path: [definition]
tf_name: tls_action
type: String
enum_values: [decrypt, skipDecrypt, doNotDecrypt]
description: TLS Action
example: decrypt
- model_name: ref
data_path: [definition, intrusionPrevention]
tf_name: intrusion_prevention_id
type: String
description: Intrusion prevention ID (unified mode)
example: b80ed541-3950-45c7-ab35-d8f11e180599
exclude_test: true
- tf_name: intrusion_prevention_version
tf_only: true
type: Version
description: Intrusion prevention version
exclude_test: true
- model_name: ref
data_path: [definition, urlFiltering]
tf_name: url_filtering_id
type: String
description: URL filtering ID (unified mode)
example: 914670a3-9726-4a51-847f-b3db70819dc2
test_value: sdwan_url_filtering_policy_definition.test.id
- tf_name: url_filtering_version
tf_only: true
type: Version
description: URL filtering version
exclude_test: true
- model_name: ref
data_path: [definition, advancedMalwareProtection]
tf_name: advanced_malware_protection_id
type: String
description: Advanced malware protection ID
example: c3590312-7f67-41d7-b9a5-42ec97c7a73d
exclude_test: true
- tf_name: advanced_malware_protection_version
tf_only: true
type: Version
description: Advanced malware protection version
exclude_test: true
- model_name: ref
data_path: [definition, sslDecryption]
tf_name: tls_ssl_decryption_id
type: String
description: TLS/SSL decryption ID
example: 84f10c9d-def7-45a3-8c64-6df26163c861
exclude_test: true
- tf_name: tls_ssl_decryption_version
tf_only: true
type: Version
description: TLS/SSL decryption version
exclude_test: true

test_prerequisites: |
resource "sdwan_url_filtering_policy_definition" "test" {
name = "TF_TEST"
description = "Terraform test"
mode = "security"
alerts = ["blacklist"]
web_categories = ["alcohol-and-tobacco"]
web_categories_action = "allow"
web_reputation = "moderate-risk"
target_vpns = ["1"]
block_page_action = "text"
block_page_contents = "Access to the requested page has been denied. Please contact your Network Administrator"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 294fa7e

Please sign in to comment.