Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for default egress policy matrix rule #97

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.6 (unreleased)

- Add `ise_trustsec_egress_matrix_cell_default` resource to support default egress policy matrix rule modifications

## 0.2.5

- Remove default_value from `systemDefined` attribute in `ise_endpoint_identity_group`
Expand Down
33 changes: 33 additions & 0 deletions docs/data-sources/trustsec_egress_matrix_cell_default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ise_trustsec_egress_matrix_cell_default Data Source - terraform-provider-ise"
subcategory: "TrustSec"
description: |-
This data source can read the TrustSec Egress Matrix Cell Default.
---

# ise_trustsec_egress_matrix_cell_default (Data Source)

This data source can read the TrustSec Egress Matrix Cell Default.

## Example Usage

```terraform
data "ise_trustsec_egress_matrix_cell_default" "example" {
id = "92c1a900-8c01-11e6-996c-525400b48521"
}
```

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

### Required

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

### Read-Only

- `default_rule` (String) Can be used only if sgacls not specified. Final Catch All Rule
- `description` (String) Description
- `matrix_cell_status` (String) Matrix Cell Status
- `sgacls` (Set of String) List of TrustSec Security Groups ACLs
4 changes: 4 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: |-

# Changelog

## 0.2.6 (unreleased)

- Add `ise_trustsec_egress_matrix_cell_default` resource to support default egress policy matrix rule modifications

## 0.2.5

- Remove default_value from `systemDefined` attribute in `ise_endpoint_identity_group`
Expand Down
46 changes: 46 additions & 0 deletions docs/resources/trustsec_egress_matrix_cell_default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ise_trustsec_egress_matrix_cell_default Resource - terraform-provider-ise"
subcategory: "TrustSec"
description: |-
Allows modifications to the default egress policy matrix rule
---

# ise_trustsec_egress_matrix_cell_default (Resource)

Allows modifications to the default egress policy matrix rule

## Example Usage

```terraform
resource "ise_trustsec_egress_matrix_cell_default" "example" {
description = "Default egress rule"
default_rule = "PERMIT_IP"
matrix_cell_status = "ENABLED"
}
```

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

### Optional

- `default_rule` (String) Can be used only if sgacls not specified. Final Catch All Rule
- Choices: `NONE`, `DENY_IP`, `PERMIT_IP`
- `description` (String) Description
- `matrix_cell_status` (String) Matrix Cell Status
- Choices: `DISABLED`, `ENABLED`, `MONITOR`
- Default value: `DISABLED`
- `sgacls` (Set of String) List of TrustSec Security Groups ACLs

### Read-Only

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

## Import

Import is supported using the following syntax:

```shell
terraform import ise_trustsec_egress_matrix_cell_default.example "92c1a900-8c01-11e6-996c-525400b48521"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "ise_trustsec_egress_matrix_cell_default" "example" {
id = "92c1a900-8c01-11e6-996c-525400b48521"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import ise_trustsec_egress_matrix_cell_default.example "92c1a900-8c01-11e6-996c-525400b48521"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "ise_trustsec_egress_matrix_cell_default" "example" {
description = "Default egress rule"
default_rule = "PERMIT_IP"
matrix_cell_status = "ENABLED"
}
54 changes: 54 additions & 0 deletions gen/definitions/trustsec_egress_matrix_cell_default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: TrustSec Egress Matrix Cell Default
rest_endpoint: /ers/config/egressmatrixcell
doc_category: TrustSec
res_description: Allows modifications to the default egress policy matrix rule
no_delete: true
put_create: true
put_id_query_path: true
skip_minimum_test: true
put_id_include_path: EgressMatrixCell
attributes:
- model_name: id
id: true
data_path: [EgressMatrixCell]
type: String
description: Default egress policy matrix rule id
value: 92c1a900-8c01-11e6-996c-525400b48521
example: 92c1a900-8c01-11e6-996c-525400b48521
exclude_test: true
- model_name: description
data_path: [EgressMatrixCell]
type: String
description: Description
example: Default egress rule
- model_name: defaultRule
data_path: [EgressMatrixCell]
type: String
enum_values: [NONE, DENY_IP, PERMIT_IP]
description: "Can be used only if sgacls not specified. Final Catch All Rule"
example: "PERMIT_IP"
- model_name: matrixCellStatus
data_path: [EgressMatrixCell]
type: String
enum_values: [DISABLED, ENABLED, MONITOR]
default_value: "DISABLED"
example: "ENABLED"
description: "Matrix Cell Status"
- model_name: sgacls
data_path: [EgressMatrixCell]
tf_name: sgacls
type: Set
element_type: String
description: List of TrustSec Security Groups ACLs
exclude_test: true
- model_name: sourceSgtId
data_path: [EgressMatrixCell]
type: String
description: Source Trustsec Security Group ID
value: "92bb1950-8c01-11e6-996c-525400b48521"
- model_name: destinationSgtId
data_path: [EgressMatrixCell]
type: String
description: Destination Trustsec Security Group ID
value: "92bb1950-8c01-11e6-996c-525400b48521"
1 change: 1 addition & 0 deletions gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type YamlConfig struct {
NoImport bool `yaml:"no_import"`
PostUpdate bool `yaml:"post_update"`
PutCreate bool `yaml:"put_create"`
PutIdQueryPath bool `yaml:"put_id_query_path"`
PutDelete bool `yaml:"put_delete"`
PutRead bool `yaml:"put_read"`
NoRead bool `yaml:"no_read"`
Expand Down
1 change: 1 addition & 0 deletions gen/schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ no_read_prefix: bool(required=False) # Set to true if it is an Open API endpoint
no_id: bool(required=False) # Set to true if the data source does not have an ID
id_path: str(required=False) # Path to the ID in the response (use "." to access nested elements)
put_id_include_path: str(required=False) # If PUT needs to have specific JSON path where ID should be inserted
put_id_query_path: bool(required=False) # Set to true if PUT request is used to create and required ID in path
data_source_name_query: bool(required=False) # Set to true if the data source supports name queries
minimum_version: str(required=False) # Define a minimum supported version
ds_description: str(required=False) # Define a data source description
Expand Down
10 changes: 8 additions & 2 deletions gen/templates/resource.go

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

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

Loading
Loading