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

Customizable ID #1

Closed
wants to merge 4 commits into from
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ website/node_modules
*.iml

website/vendor
terraform-provider-meraki

# Test exclusions
!command/test-fixtures/**/*.tfstate
Expand Down
46 changes: 46 additions & 0 deletions docs/data-sources/network_group_policies.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: "meraki_network_group_policies Data Source - terraform-provider-meraki"
subcategory: "Networks"
description: |-
This data source can read the Network Group Policies configuration.
---

# meraki_network_group_policies (Data Source)

This data source can read the `Network Group Policies` configuration.

## Example Usage

```terraform
data "meraki_network_group_policies" "example" {
id = "L_123456"
network_id = "L_123456"
}
```

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

### Required

- `network_id` (String) Network ID

### Optional

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

### Read-Only

- `bonjour_forwarding_rules` (Attributes List) (see [below for nested schema](#nestedatt--bonjour_forwarding_rules))
- `bonjour_forwarding_settings` (String)

<a id="nestedatt--bonjour_forwarding_rules"></a>
### Nested Schema for `bonjour_forwarding_rules`

Read-Only:

- `description` (String)
- `services` (List of String)
- `vlan_id` (String)
37 changes: 37 additions & 0 deletions docs/data-sources/network_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "meraki_network_settings Data Source - terraform-provider-meraki"
subcategory: "Networks"
description: |-
This data source can read the Network Settings configuration.
---

# meraki_network_settings (Data Source)

This data source can read the `Network Settings` configuration.

## Example Usage

```terraform
data "meraki_network_settings" "example" {
id = "L_123456"
network_id = "L_123456"
}
```

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

### Required

- `id` (String) The id of the object
- `network_id` (String) Network ID

### Read-Only

- `local_status_page_authentication_enabled` (Boolean)
- `local_status_page_authentication_password` (String)
- `local_status_page_enabled` (Boolean) asdasdas
- `named_vlans_enabled` (Boolean)
- `remote_status_page_enabled` (Boolean)
- `secure_port_enabled` (Boolean)
62 changes: 62 additions & 0 deletions docs/resources/network_group_policies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "meraki_network_group_policies Resource - terraform-provider-meraki"
subcategory: "Networks"
description: |-
This resource can manage the Network Group Policies configuration.
---

# meraki_network_group_policies (Resource)

This resource can manage the `Network Group Policies` configuration.

## Example Usage

```terraform
resource "meraki_network_group_policies" "example" {
network_id = "L_123456"
name = "test_group_policy"
bonjour_forwarding_settings = "custom"
bonjour_forwarding_rules = [
{
description = "a simple bonjour rule"
services = ["All Services"]
vlan_id = "2"
}
]
}
```

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

### Required

- `name` (String)
- `network_id` (String) Network ID

### Optional

- `bonjour_forwarding_rules` (Attributes List) (see [below for nested schema](#nestedatt--bonjour_forwarding_rules))
- `bonjour_forwarding_settings` (String)

### Read-Only

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

<a id="nestedatt--bonjour_forwarding_rules"></a>
### Nested Schema for `bonjour_forwarding_rules`

Optional:

- `description` (String)
- `services` (List of String)
- `vlan_id` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import meraki_network_group_policies.example "<network_id>"
```
53 changes: 53 additions & 0 deletions docs/resources/network_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "meraki_network_settings Resource - terraform-provider-meraki"
subcategory: "Networks"
description: |-
This resource can manage the Network Settings configuration.
---

# meraki_network_settings (Resource)

This resource can manage the `Network Settings` configuration.

## Example Usage

```terraform
resource "meraki_network_settings" "example" {
network_id = "L_123456"
local_status_page_enabled = false
remote_status_page_enabled = false
local_status_page_authentication_enabled = false
local_status_page_authentication_password = "miles123"
named_vlans_enabled = false
secure_port_enabled = false
}
```

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

### Required

- `local_status_page_enabled` (Boolean) asdasdas
- `network_id` (String) Network ID

### Optional

- `local_status_page_authentication_enabled` (Boolean)
- `local_status_page_authentication_password` (String)
- `named_vlans_enabled` (Boolean)
- `remote_status_page_enabled` (Boolean)
- `secure_port_enabled` (Boolean)

### Read-Only

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

## Import

Import is supported using the following syntax:

```shell
terraform import meraki_network_settings.example "<network_id>"
```
2 changes: 1 addition & 1 deletion docs/resources/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This resource can manage the `Organization` configuration.

```terraform
resource "meraki_organization" "example" {
name = "My organization"
name = "Dev"
management_details = [
{
name = "MSP ID"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "meraki_network_group_policies" "example" {
id = "L_123456"
network_id = "L_123456"
}
4 changes: 4 additions & 0 deletions examples/data-sources/meraki_network_settings/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "meraki_network_settings" "example" {
id = "L_123456"
network_id = "L_123456"
}
1 change: 1 addition & 0 deletions examples/resources/meraki_network_group_policies/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import meraki_network_group_policies.example "<network_id>"
12 changes: 12 additions & 0 deletions examples/resources/meraki_network_group_policies/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource "meraki_network_group_policies" "example" {
network_id = "L_123456"
name = "test_group_policy"
bonjour_forwarding_settings = "custom"
bonjour_forwarding_rules = [
{
description = "a simple bonjour rule"
services = ["All Services"]
vlan_id = "2"
}
]
}
1 change: 1 addition & 0 deletions examples/resources/meraki_network_settings/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import meraki_network_settings.example "<network_id>"
9 changes: 9 additions & 0 deletions examples/resources/meraki_network_settings/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resource "meraki_network_settings" "example" {
network_id = "L_123456"
local_status_page_enabled = false
remote_status_page_enabled = false
local_status_page_authentication_enabled = false
local_status_page_authentication_password = "miles123"
named_vlans_enabled = false
secure_port_enabled = false
}
2 changes: 1 addition & 1 deletion examples/resources/meraki_organization/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "meraki_organization" "example" {
name = "My organization"
name = "Dev"
management_details = [
{
name = "MSP ID"
Expand Down
4 changes: 2 additions & 2 deletions gen/definitions/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ attributes:
example: west
test_prerequisites: |
data "meraki_organization" "test" {
name = "TF Test"
name = "Dev"
}
resource "meraki_network" "test" {
organization_id = data.meraki_organization.test.id
name = "Network1"
product_types = ["switch"]
product_types = ["switch", "wireless"]
}
2 changes: 1 addition & 1 deletion gen/definitions/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ attributes:
example: tag1
test_prerequisites: |
data "meraki_organization" "test" {
name = "TF Test"
name = "Dev"
}
50 changes: 50 additions & 0 deletions gen/definitions/networks_group_policies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Network Group Policies
rest_endpoint: /networks/%v/groupPolicies
doc_category: Networks
id_name: group_policy_id
data_source_name_query: true
attributes:
- tf_name: network_id
type: String
id: true
reference: true
description: Network ID
example: L_123456
test_value: meraki_network.test.id
- model_name: name
type: String
mandatory: true
example: test_group_policy
- model_name: settings
data_path: [bonjourForwarding]
type: String
example: custom
- model_name: rules
data_path: [bonjourForwarding]
type: List
attributes:
- model_name: description
type: String
example: a simple bonjour rule
- model_name: services
type: List
element_type: String
example: All Services
- model_name: vlanId
type: String
example: "2"





test_prerequisites: |
data "meraki_organization" "test" {
name = "Dev"
}
resource "meraki_network" "test" {
organization_id = data.meraki_organization.test.id
name = "Network1"
product_types = ["switch", "wireless"]
}
50 changes: 50 additions & 0 deletions gen/definitions/networks_settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Network Settings
rest_endpoint: /networks/%v/settings
no_delete: true
put_create: true
doc_category: Networks
attributes:
- tf_name: network_id
type: String
id: true
reference: true
description: Network ID
example: L_123456
test_value: meraki_network.test.id
- model_name: localStatusPageEnabled
type: Bool
description: asdasdas
example: false
mandatory: true
- model_name: remoteStatusPageEnabled
type: Bool
example: false
- model_name: enabled
data_path: [localStatusPage, authentication]
type: Bool
example: false
- model_name: password
data_path: [localStatusPage, authentication]
type: String
example: miles123
write_only: true
- model_name: enabled
data_path: [namedVlans]
type: Bool
example: false
- model_name: enabled
data_path: [securePort]
type: Bool
example: false


test_prerequisites: |
data "meraki_organization" "test" {
name = "Dev"
}
resource "meraki_network" "test" {
organization_id = data.meraki_organization.test.id
name = "Network1"
product_types = ["switch", "wireless"]
}
2 changes: 1 addition & 1 deletion gen/definitions/organization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ attributes:
type: String
mandatory: true
description: The name of the organization
example: My organization
example: Dev
- model_name: details
data_path: [management]
description: Details related to organization management, possibly empty
Expand Down
Loading
Loading