Skip to content

Commit 1230be6

Browse files
author
Marcin Parafiniuk
committed
id_name refactor + network group policies
1 parent 6703044 commit 1230be6

34 files changed

+2260
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ website/node_modules
2626
*.iml
2727

2828
website/vendor
29+
terraform-provider-meraki
2930

3031
# Test exclusions
3132
!command/test-fixtures/**/*.tfstate
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "meraki_network_group_policies Data Source - terraform-provider-meraki"
4+
subcategory: "Networks"
5+
description: |-
6+
This data source can read the Network Group Policies configuration.
7+
---
8+
9+
# meraki_network_group_policies (Data Source)
10+
11+
This data source can read the `Network Group Policies` configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "meraki_network_group_policies" "example" {
17+
id = "12345678"
18+
network_id = "L_123456"
19+
}
20+
```
21+
22+
<!-- schema generated by tfplugindocs -->
23+
## Schema
24+
25+
### Required
26+
27+
- `network_id` (String) Network ID
28+
29+
### Optional
30+
31+
- `id` (String) The id of the object
32+
- `name` (String)
33+
34+
### Read-Only
35+
36+
- `bandwidth_bandwidth_limits_limit_down` (Number)
37+
- `bandwidth_bandwidth_limits_limit_up` (Number)
38+
- `bandwidth_settings` (String)
39+
- `bonjour_forwarding_rules` (Attributes List) (see [below for nested schema](#nestedatt--bonjour_forwarding_rules))
40+
- `bonjour_forwarding_settings` (String)
41+
- `content_filtering_allowed_url_patterns_settings` (String)
42+
- `content_filtering_blocked_url_categories_categories` (List of String)
43+
- `content_filtering_blocked_url_categories_settings` (String)
44+
- `content_filtering_blocked_url_patterns_patterns` (List of String)
45+
- `content_filtering_blocked_url_patterns_settings` (String)
46+
47+
<a id="nestedatt--bonjour_forwarding_rules"></a>
48+
### Nested Schema for `bonjour_forwarding_rules`
49+
50+
Read-Only:
51+
52+
- `description` (String)
53+
- `services` (List of String)
54+
- `vlan_id` (String)

docs/data-sources/network_settings.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "meraki_network_settings Data Source - terraform-provider-meraki"
4+
subcategory: "Networks"
5+
description: |-
6+
This data source can read the Network Settings configuration.
7+
---
8+
9+
# meraki_network_settings (Data Source)
10+
11+
This data source can read the `Network Settings` configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "meraki_network_settings" "example" {
17+
id = "L_123456"
18+
network_id = "L_123456"
19+
}
20+
```
21+
22+
<!-- schema generated by tfplugindocs -->
23+
## Schema
24+
25+
### Required
26+
27+
- `network_id` (String) Network ID
28+
29+
### Read-Only
30+
31+
- `id` (String) The id of the object
32+
- `local_status_page_authentication_enabled` (Boolean)
33+
- `local_status_page_authentication_password` (String)
34+
- `local_status_page_enabled` (Boolean) asdasdas
35+
- `named_vlans_enabled` (Boolean)
36+
- `remote_status_page_enabled` (Boolean)
37+
- `secure_port_enabled` (Boolean)
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "meraki_network_group_policies Resource - terraform-provider-meraki"
4+
subcategory: "Networks"
5+
description: |-
6+
This resource can manage the Network Group Policies configuration.
7+
---
8+
9+
# meraki_network_group_policies (Resource)
10+
11+
This resource can manage the `Network Group Policies` configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "meraki_network_group_policies" "example" {
17+
network_id = "L_123456"
18+
name = "test_group_policy"
19+
bonjour_forwarding_settings = "custom"
20+
bonjour_forwarding_rules = [
21+
{
22+
description = "a simple bonjour rule"
23+
services = ["All Services"]
24+
vlan_id = "2"
25+
}
26+
]
27+
bandwidth_bandwidth_limits_limit_down = 1000000
28+
bandwidth_bandwidth_limits_limit_up = 1000000
29+
bandwidth_settings = "custom"
30+
content_filtering_allowed_url_patterns_settings = "network default"
31+
content_filtering_blocked_url_categories_categories = ["meraki:contentFiltering/category/1"]
32+
content_filtering_blocked_url_categories_settings = "override"
33+
content_filtering_blocked_url_patterns_patterns = ["http://www.betting.com"]
34+
content_filtering_blocked_url_patterns_settings = "append"
35+
}
36+
```
37+
38+
<!-- schema generated by tfplugindocs -->
39+
## Schema
40+
41+
### Required
42+
43+
- `name` (String)
44+
- `network_id` (String) Network ID
45+
46+
### Optional
47+
48+
- `bandwidth_bandwidth_limits_limit_down` (Number)
49+
- `bandwidth_bandwidth_limits_limit_up` (Number)
50+
- `bandwidth_settings` (String)
51+
- `bonjour_forwarding_rules` (Attributes List) (see [below for nested schema](#nestedatt--bonjour_forwarding_rules))
52+
- `bonjour_forwarding_settings` (String)
53+
- `content_filtering_allowed_url_patterns_settings` (String)
54+
- `content_filtering_blocked_url_categories_categories` (List of String)
55+
- `content_filtering_blocked_url_categories_settings` (String)
56+
- `content_filtering_blocked_url_patterns_patterns` (List of String)
57+
- `content_filtering_blocked_url_patterns_settings` (String)
58+
59+
### Read-Only
60+
61+
- `id` (String) The id of the object
62+
63+
<a id="nestedatt--bonjour_forwarding_rules"></a>
64+
### Nested Schema for `bonjour_forwarding_rules`
65+
66+
Optional:
67+
68+
- `description` (String)
69+
- `services` (List of String)
70+
- `vlan_id` (String)
71+
72+
## Import
73+
74+
Import is supported using the following syntax:
75+
76+
```shell
77+
terraform import meraki_network_group_policies.example "<network_id>,<id>"
78+
```

docs/resources/network_settings.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "meraki_network_settings Resource - terraform-provider-meraki"
4+
subcategory: "Networks"
5+
description: |-
6+
This resource can manage the Network Settings configuration.
7+
---
8+
9+
# meraki_network_settings (Resource)
10+
11+
This resource can manage the `Network Settings` configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "meraki_network_settings" "example" {
17+
network_id = "L_123456"
18+
local_status_page_enabled = false
19+
remote_status_page_enabled = false
20+
local_status_page_authentication_enabled = false
21+
local_status_page_authentication_password = "miles123"
22+
named_vlans_enabled = false
23+
secure_port_enabled = false
24+
}
25+
```
26+
27+
<!-- schema generated by tfplugindocs -->
28+
## Schema
29+
30+
### Required
31+
32+
- `network_id` (String) Network ID
33+
34+
### Optional
35+
36+
- `local_status_page_authentication_enabled` (Boolean)
37+
- `local_status_page_authentication_password` (String)
38+
- `local_status_page_enabled` (Boolean) asdasdas
39+
- `named_vlans_enabled` (Boolean)
40+
- `remote_status_page_enabled` (Boolean)
41+
- `secure_port_enabled` (Boolean)
42+
43+
### Read-Only
44+
45+
- `id` (String) The id of the object
46+
47+
## Import
48+
49+
Import is supported using the following syntax:
50+
51+
```shell
52+
terraform import meraki_network_settings.example "<network_id>"
53+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
data "meraki_network_group_policies" "example" {
2+
id = "12345678"
3+
network_id = "L_123456"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
data "meraki_network_settings" "example" {
2+
id = "L_123456"
3+
network_id = "L_123456"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import meraki_network_group_policies.example "<network_id>,<id>"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
resource "meraki_network_group_policies" "example" {
2+
network_id = "L_123456"
3+
name = "test_group_policy"
4+
bonjour_forwarding_settings = "custom"
5+
bonjour_forwarding_rules = [
6+
{
7+
description = "a simple bonjour rule"
8+
services = ["All Services"]
9+
vlan_id = "2"
10+
}
11+
]
12+
bandwidth_bandwidth_limits_limit_down = 1000000
13+
bandwidth_bandwidth_limits_limit_up = 1000000
14+
bandwidth_settings = "custom"
15+
content_filtering_allowed_url_patterns_settings = "network default"
16+
content_filtering_blocked_url_categories_categories = ["meraki:contentFiltering/category/1"]
17+
content_filtering_blocked_url_categories_settings = "override"
18+
content_filtering_blocked_url_patterns_patterns = ["http://www.betting.com"]
19+
content_filtering_blocked_url_patterns_settings = "append"
20+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import meraki_network_settings.example "<network_id>"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
resource "meraki_network_settings" "example" {
2+
network_id = "L_123456"
3+
local_status_page_enabled = false
4+
remote_status_page_enabled = false
5+
local_status_page_authentication_enabled = false
6+
local_status_page_authentication_password = "miles123"
7+
named_vlans_enabled = false
8+
secure_port_enabled = false
9+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: Network Group Policies
3+
rest_endpoint: /networks/%v/groupPolicies
4+
doc_category: Networks
5+
id_name: groupPolicyId
6+
data_source_name_query: true
7+
attributes:
8+
- tf_name: network_id
9+
type: String
10+
reference: true
11+
description: Network ID
12+
example: L_123456
13+
test_value: meraki_network.test.id
14+
- model_name: name
15+
type: String
16+
mandatory: true
17+
example: test_group_policy
18+
- model_name: settings
19+
data_path: [bonjourForwarding]
20+
type: String
21+
example: custom
22+
- model_name: rules
23+
data_path: [bonjourForwarding]
24+
type: List
25+
attributes:
26+
- model_name: description
27+
type: String
28+
example: a simple bonjour rule
29+
- model_name: services
30+
type: List
31+
element_type: String
32+
example: All Services
33+
- model_name: vlanId
34+
type: String
35+
example: "2"
36+
- model_name: limitDown
37+
data_path: [bandwidth, bandwidthLimits]
38+
type: Int64
39+
example: 1000000
40+
- model_name: limitUp
41+
data_path: [bandwidth, bandwidthLimits]
42+
type: Int64
43+
example: 1000000
44+
- model_name: settings
45+
data_path: [bandwidth]
46+
type: String
47+
example: custom
48+
- model_name: settings
49+
data_path: [contentFiltering, allowedUrlPatterns]
50+
exclude_test: true
51+
type: String
52+
example: network default
53+
- model_name: categories
54+
data_path: [contentFiltering, blockedUrlCategories]
55+
exclude_test: true
56+
type: List
57+
element_type: String
58+
example: meraki:contentFiltering/category/1
59+
- model_name: settings
60+
data_path: [contentFiltering, blockedUrlCategories]
61+
exclude_test: true
62+
example: override
63+
type: String
64+
- model_name: patterns
65+
type: List
66+
data_path: [contentFiltering, blockedUrlPatterns]
67+
exclude_test: true
68+
element_type: String
69+
example: http://www.betting.com
70+
- model_name: settings
71+
data_path: [contentFiltering, blockedUrlPatterns]
72+
exclude_test: true
73+
example: append
74+
type: String
75+
76+
test_prerequisites: |
77+
data "meraki_organization" "test" {
78+
name = "Dev"
79+
}
80+
resource "meraki_network" "test" {
81+
organization_id = data.meraki_organization.test.id
82+
name = "Network1"
83+
product_types = ["switch", "wireless"]
84+
}

0 commit comments

Comments
 (0)