-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add organization adaptive policy acl resource and data source
- Loading branch information
Showing
13 changed files
with
1,129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "meraki_organization_adaptive_policy_acl Data Source - terraform-provider-meraki" | ||
subcategory: "Organizations" | ||
description: |- | ||
This data source can read the Organization Adaptive Policy ACL configuration. | ||
--- | ||
|
||
# meraki_organization_adaptive_policy_acl (Data Source) | ||
|
||
This data source can read the `Organization Adaptive Policy ACL` configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "meraki_organization_adaptive_policy_acl" "example" { | ||
id = "12345678" | ||
organization_id = "123456" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `organization_id` (String) Organization ID | ||
|
||
### Optional | ||
|
||
- `id` (String) The id of the object | ||
- `name` (String) Name of the adaptive policy ACL | ||
|
||
### Read-Only | ||
|
||
- `description` (String) Description of the adaptive policy ACL | ||
- `ip_version` (String) IP version of adpative policy ACL. One of: `any`, `ipv4` or `ipv6` | ||
- `rules` (Attributes List) An ordered array of the adaptive policy ACL rules. (see [below for nested schema](#nestedatt--rules)) | ||
|
||
<a id="nestedatt--rules"></a> | ||
### Nested Schema for `rules` | ||
|
||
Read-Only: | ||
|
||
- `dst_port` (String) Destination port. Must be in the format of single port: `1`, port list: `1,2` or port range: `1-10`, and in the range of 1-65535, or `any`. Default is `any`. | ||
- `policy` (String) `allow` or `deny` traffic specified by this rule. | ||
- `protocol` (String) The type of protocol (must be `tcp`, `udp`, `icmp` or `any`). | ||
- `src_port` (String) Source port. Must be in the format of single port: `1`, port list: `1,2` or port range: `1-10`, and in the range of 1-65535, or `any`. Default is `any`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "meraki_organization_adaptive_policy_acl Resource - terraform-provider-meraki" | ||
subcategory: "Organizations" | ||
description: |- | ||
This resource can manage the Organization Adaptive Policy ACL configuration. | ||
--- | ||
|
||
# meraki_organization_adaptive_policy_acl (Resource) | ||
|
||
This resource can manage the `Organization Adaptive Policy ACL` configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "meraki_organization_adaptive_policy_acl" "example" { | ||
organization_id = "123456" | ||
description = "Blocks sensitive web traffic" | ||
ip_version = "ipv6" | ||
name = "Block sensitive web traffic" | ||
rules = [ | ||
{ | ||
dst_port = "22-30" | ||
policy = "deny" | ||
protocol = "tcp" | ||
src_port = "1,33" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `ip_version` (String) IP version of adpative policy ACL. One of: `any`, `ipv4` or `ipv6` | ||
- Choices: `any`, `ipv4`, `ipv6` | ||
- `name` (String) Name of the adaptive policy ACL | ||
- `organization_id` (String) Organization ID | ||
- `rules` (Attributes List) An ordered array of the adaptive policy ACL rules. (see [below for nested schema](#nestedatt--rules)) | ||
|
||
### Optional | ||
|
||
- `description` (String) Description of the adaptive policy ACL | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
<a id="nestedatt--rules"></a> | ||
### Nested Schema for `rules` | ||
|
||
Required: | ||
|
||
- `policy` (String) `allow` or `deny` traffic specified by this rule. | ||
- Choices: `allow`, `deny` | ||
- `protocol` (String) The type of protocol (must be `tcp`, `udp`, `icmp` or `any`). | ||
- Choices: `any`, `icmp`, `tcp`, `udp` | ||
|
||
Optional: | ||
|
||
- `dst_port` (String) Destination port. Must be in the format of single port: `1`, port list: `1,2` or port range: `1-10`, and in the range of 1-65535, or `any`. Default is `any`. | ||
- `src_port` (String) Source port. Must be in the format of single port: `1`, port list: `1,2` or port range: `1-10`, and in the range of 1-65535, or `any`. Default is `any`. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import meraki_organization_adaptive_policy_acl.example "<organization_id>,<id>" | ||
``` |
4 changes: 4 additions & 0 deletions
4
examples/data-sources/meraki_organization_adaptive_policy_acl/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data "meraki_organization_adaptive_policy_acl" "example" { | ||
id = "12345678" | ||
organization_id = "123456" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/meraki_organization_adaptive_policy_acl/import.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import meraki_organization_adaptive_policy_acl.example "<organization_id>,<id>" |
14 changes: 14 additions & 0 deletions
14
examples/resources/meraki_organization_adaptive_policy_acl/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "meraki_organization_adaptive_policy_acl" "example" { | ||
organization_id = "123456" | ||
description = "Blocks sensitive web traffic" | ||
ip_version = "ipv6" | ||
name = "Block sensitive web traffic" | ||
rules = [ | ||
{ | ||
dst_port = "22-30" | ||
policy = "deny" | ||
protocol = "tcp" | ||
src_port = "1,33" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Organization Adaptive Policy ACL | ||
rest_endpoint: /organizations/%v/adaptivePolicy/acls | ||
id_name: aclId | ||
data_source_name_query: true | ||
doc_category: Organizations | ||
attributes: | ||
- tf_name: organization_id | ||
type: String | ||
reference: true | ||
description: Organization ID | ||
example: "123456" | ||
test_value: data.meraki_organization.test.id | ||
- model_name: description | ||
type: String | ||
description: Description of the adaptive policy ACL | ||
example: Blocks sensitive web traffic | ||
- model_name: ipVersion | ||
type: String | ||
mandatory: true | ||
description: 'IP version of adpative policy ACL. One of: `any`, `ipv4` or `ipv6`' | ||
example: ipv6 | ||
enum_values: [any, ipv4, ipv6] | ||
- model_name: name | ||
type: String | ||
mandatory: true | ||
description: Name of the adaptive policy ACL | ||
example: Block sensitive web traffic | ||
- model_name: rules | ||
type: List | ||
mandatory: true | ||
description: An ordered array of the adaptive policy ACL rules. | ||
ordered_list: true | ||
attributes: | ||
- model_name: dstPort | ||
type: String | ||
description: 'Destination port. Must be in the format of single port: `1`, port list: `1,2` or port range: `1-10`, and in the range of 1-65535, or `any`. Default is `any`.' | ||
example: 22-30 | ||
- model_name: policy | ||
type: String | ||
mandatory: true | ||
description: '`allow` or `deny` traffic specified by this rule.' | ||
example: deny | ||
enum_values: [allow, deny] | ||
- model_name: protocol | ||
type: String | ||
mandatory: true | ||
description: The type of protocol (must be `tcp`, `udp`, `icmp` or `any`). | ||
example: tcp | ||
enum_values: [any, icmp, tcp, udp] | ||
- model_name: srcPort | ||
type: String | ||
description: 'Source port. Must be in the format of single port: `1`, port list: `1,2` or port range: `1-10`, and in the range of 1-65535, or `any`. Default is `any`.' | ||
example: 1,33 | ||
test_prerequisites: | | ||
data "meraki_organization" "test" { | ||
name = "Dev" | ||
} | ||
resource "meraki_network" "test" { | ||
organization_id = data.meraki_organization.test.id | ||
name = "Network1" | ||
product_types = ["switch"] | ||
} |
Oops, something went wrong.