Skip to content

Commit

Permalink
Add downloadable acl resource
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Dec 1, 2023
1 parent 128fdf7 commit 63b6842
Show file tree
Hide file tree
Showing 15 changed files with 819 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.6 (unreleased)

- Add `ise_downloadable_acl` resource and data source

## 0.1.5

- Make `sgacls` attribute of `ise_trustsec_egress_matrix_cell` resource optional
Expand Down
33 changes: 33 additions & 0 deletions docs/data-sources/downloadable_acl.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_downloadable_acl Data Source - terraform-provider-ise"
subcategory: "Policy"
description: |-
This data source can read the Downloadable ACL.
---

# ise_downloadable_acl (Data Source)

This data source can read the Downloadable ACL.

## Example Usage

```terraform
data "ise_downloadable_acl" "example" {
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
}
```

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

### Optional

- `id` (String) The id of the object
- `name` (String) The name of the downloadable ACL

### Read-Only

- `dacl` (String) The DACL content
- `dacl_type` (String) The type of ACL
- `description` (String) Description
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.1.6 (unreleased)

- Add `ise_downloadable_acl` resource and data source

## 0.1.5

- Make `sgacls` attribute of `ise_trustsec_egress_matrix_cell` resource optional
Expand Down
49 changes: 49 additions & 0 deletions docs/resources/downloadable_acl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ise_downloadable_acl Resource - terraform-provider-ise"
subcategory: "Policy"
description: |-
This resource can manage a Downloadable ACL.
---

# ise_downloadable_acl (Resource)

This resource can manage a Downloadable ACL.

## Example Usage

```terraform
resource "ise_downloadable_acl" "example" {
name = "MyACL"
description = "My first downloadable ACL"
dacl = "permit ip any any"
dacl_type = "IPV4"
}
```

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

### Required

- `dacl` (String) The DACL content
- `name` (String) The name of the downloadable ACL

### Optional

- `dacl_type` (String) The type of ACL
- Choices: `IPV4`, `IPV6`, `IP_AGNOSTIC`
- Default value: `IPV4`
- `description` (String) Description

### Read-Only

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

## Import

Import is supported using the following syntax:

```shell
terraform import ise_downloadable_acl.example "76d24097-41c4-4558-a4d0-a8c07ac08470"
```
3 changes: 3 additions & 0 deletions examples/data-sources/ise_downloadable_acl/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "ise_downloadable_acl" "example" {
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
}
1 change: 1 addition & 0 deletions examples/resources/ise_downloadable_acl/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import ise_downloadable_acl.example "76d24097-41c4-4558-a4d0-a8c07ac08470"
6 changes: 6 additions & 0 deletions examples/resources/ise_downloadable_acl/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "ise_downloadable_acl" "example" {
name = "MyACL"
description = "My first downloadable ACL"
dacl = "permit ip any any"
dacl_type = "IPV4"
}
30 changes: 30 additions & 0 deletions gen/definitions/downloadable_acl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Downloadable ACL
rest_endpoint: /ers/config/downloadableacl
data_source_name_query: true
doc_category: Policy
attributes:
- model_name: name
data_path: [DownloadableAcl]
type: String
mandatory: true
description: The name of the downloadable ACL
example: MyACL
- model_name: description
data_path: [DownloadableAcl]
type: String
description: Description
example: My first downloadable ACL
- model_name: dacl
data_path: [DownloadableAcl]
type: String
mandatory: true
description: The DACL content
example: permit ip any any
- model_name: daclType
data_path: [DownloadableAcl]
type: String
enum_values: [IPV4, IPV6, IP_AGNOSTIC]
description: The type of ACL
default_value: IPV4
example: IPV4
163 changes: 163 additions & 0 deletions internal/provider/data_source_ise_downloadable_acl.go

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

72 changes: 72 additions & 0 deletions internal/provider/data_source_ise_downloadable_acl_test.go

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

Loading

0 comments on commit 63b6842

Please sign in to comment.