Skip to content

Commit

Permalink
Add switch organization ports profiles automation resource and data s…
Browse files Browse the repository at this point in the history
…ources
  • Loading branch information
danischm committed Nov 2, 2024
1 parent 4aa0772 commit b0bac13
Show file tree
Hide file tree
Showing 20 changed files with 2,121 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add `dhcp_boot_filename`, `dhcp_boot_next_server`, `dns_nameservers`, `vpn_nat_subnet`, `dhcp_relay_server_ips` and `reserved_ip_ranges` attributes to `meraki_appliance_vlan` resource and data source
- Add `meraki_organization_early_access_features_opt_in` resource and data sources
- Add `meraki_switch_organization_ports_profile` resource and data sources
- Add `meraki_switch_organization_ports_profiles_automation` resource and data sources

## 0.1.2

Expand Down
70 changes: 70 additions & 0 deletions docs/data-sources/switch_organization_ports_profiles_automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "meraki_switch_organization_ports_profiles_automation Data Source - terraform-provider-meraki"
subcategory: "Switches"
description: |-
This data source can read the Switch Organization Ports Profiles Automation configuration.
~>Warning: This resource or data source depends on an Early Access API endpoint. These API endpoints are subject to breaking changes without prior notice.
---

# meraki_switch_organization_ports_profiles_automation (Data Source)

This data source can read the `Switch Organization Ports Profiles Automation` configuration.

~>Warning: This resource or data source depends on an Early Access API endpoint. These API endpoints are subject to breaking changes without prior notice.

## Example Usage

```terraform
data "meraki_switch_organization_ports_profiles_automation" "example" {
id = "12345678"
organization_id = "123456"
}
```

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

### Required

- `organization_id` (String) Organization ID

### Optional

- `fallback_profile_name` (String) Default port profile name
- `id` (String) The id of the object
- `name` (String) Name of the port profile automation.

### Read-Only

- `assigned_switch_ports` (Attributes List) assigned switch ports (see [below for nested schema](#nestedatt--assigned_switch_ports))
- `description` (String) Text describing the port profile automation.
- `fallback_profile_id` (String) Default port profile Id
- `rules` (Attributes List) Configuration settings for port profile automation rules (see [below for nested schema](#nestedatt--rules))

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

Read-Only:

- `switch_port_ids` (List of String) List of port ids
- `switch_serial` (String) Serial number of the switch


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

Read-Only:

- `conditions` (Attributes List) Configuration settings for port profile automation conditions (see [below for nested schema](#nestedatt--rules--conditions))
- `priority` (Number) Priority of automation rule in sequence
- `profile_id` (String) ID of port profile
- `profile_name` (String) Name of port profile

<a id="nestedatt--rules--conditions"></a>
### Nested Schema for `rules.conditions`

Read-Only:

- `attribute` (String) Type of the condition
- `values` (List of String) Value of the condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "meraki_switch_organization_ports_profiles_automations Data Source - terraform-provider-meraki"
subcategory: "Switches"
description: |-
This data source can read the Switch Organization Ports Profiles Automation configuration.
~>Warning: This resource or data source depends on an Early Access API endpoint. These API endpoints are subject to breaking changes without prior notice.
---

# meraki_switch_organization_ports_profiles_automations (Data Source)

This data source can read the `Switch Organization Ports Profiles Automation` configuration.

~>Warning: This resource or data source depends on an Early Access API endpoint. These API endpoints are subject to breaking changes without prior notice.

## Example Usage

```terraform
data "meraki_switch_organization_ports_profiles_automations" "example" {
organization_id = "123456"
}
```

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

### Required

- `organization_id` (String) Organization ID

### Read-Only

- `items` (Attributes List) The list of items (see [below for nested schema](#nestedatt--items))

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

Read-Only:

- `assigned_switch_ports` (Attributes List) assigned switch ports (see [below for nested schema](#nestedatt--items--assigned_switch_ports))
- `description` (String) Text describing the port profile automation.
- `fallback_profile_id` (String) Default port profile Id
- `fallback_profile_name` (String) Default port profile name
- `id` (String) The id of the object
- `name` (String) Name of the port profile automation.
- `rules` (Attributes List) Configuration settings for port profile automation rules (see [below for nested schema](#nestedatt--items--rules))

<a id="nestedatt--items--assigned_switch_ports"></a>
### Nested Schema for `items.assigned_switch_ports`

Read-Only:

- `switch_port_ids` (List of String) List of port ids
- `switch_serial` (String) Serial number of the switch


<a id="nestedatt--items--rules"></a>
### Nested Schema for `items.rules`

Read-Only:

- `conditions` (Attributes List) Configuration settings for port profile automation conditions (see [below for nested schema](#nestedatt--items--rules--conditions))
- `priority` (Number) Priority of automation rule in sequence
- `profile_id` (String) ID of port profile
- `profile_name` (String) Name of port profile

<a id="nestedatt--items--rules--conditions"></a>
### Nested Schema for `items.rules.conditions`

Read-Only:

- `attribute` (String) Type of the condition
- `values` (List of String) Value of the condition
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ description: |-
- Add `dhcp_boot_filename`, `dhcp_boot_next_server`, `dns_nameservers`, `vpn_nat_subnet`, `dhcp_relay_server_ips` and `reserved_ip_ranges` attributes to `meraki_appliance_vlan` resource and data source
- Add `meraki_organization_early_access_features_opt_in` resource and data sources
- Add `meraki_switch_organization_ports_profile` resource and data sources
- Add `meraki_switch_organization_ports_profiles_automation` resource and data sources

## 0.1.2

Expand Down
103 changes: 103 additions & 0 deletions docs/resources/switch_organization_ports_profiles_automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "meraki_switch_organization_ports_profiles_automation Resource - terraform-provider-meraki"
subcategory: "Switches"
description: |-
This resource can manage the Switch Organization Ports Profiles Automation configuration.
~>Warning: This resource or data source depends on an Early Access API endpoint. These API endpoints are subject to breaking changes without prior notice.
---

# meraki_switch_organization_ports_profiles_automation (Resource)

This resource can manage the `Switch Organization Ports Profiles Automation` configuration.

~>Warning: This resource or data source depends on an Early Access API endpoint. These API endpoints are subject to breaking changes without prior notice.

## Example Usage

```terraform
resource "meraki_switch_organization_ports_profiles_automation" "example" {
organization_id = "123456"
description = "A full length description of the automation."
name = "Automation 1"
assigned_switch_ports = [
{
switch_serial = "Q234-ABCD-5678"
switch_port_ids = ["3"]
}
]
rules = [
{
priority = 1
profile_id = "32"
profile_name = "Profile 2"
conditions = [
{
attribute = "LLDP system description"
values = ["Meraki MR*"]
}
]
}
]
}
```

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

### Required

- `name` (String) Name of the port profile automation.
- `organization_id` (String) Organization ID
- `rules` (Attributes List) Configuration settings for port profile automation rules (see [below for nested schema](#nestedatt--rules))

### Optional

- `assigned_switch_ports` (Attributes List) assigned switch ports (see [below for nested schema](#nestedatt--assigned_switch_ports))
- `description` (String) Text describing the port profile automation.
- `fallback_profile_id` (String) Default port profile Id
- `fallback_profile_name` (String) Default port profile name

### Read-Only

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

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

Required:

- `conditions` (Attributes List) Configuration settings for port profile automation conditions (see [below for nested schema](#nestedatt--rules--conditions))
- `priority` (Number) Priority of automation rule in sequence

Optional:

- `profile_id` (String) ID of port profile
- `profile_name` (String) Name of port profile

<a id="nestedatt--rules--conditions"></a>
### Nested Schema for `rules.conditions`

Required:

- `attribute` (String) Type of the condition
- Choices: `LLDP system description`, `MAC address`
- `values` (List of String) Value of the condition



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

Optional:

- `switch_port_ids` (List of String) List of port ids
- `switch_serial` (String) Serial number of the switch

## Import

Import is supported using the following syntax:

```shell
terraform import meraki_switch_organization_ports_profiles_automation.example "<organization_id>,<id>"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "meraki_switch_organization_ports_profiles_automation" "example" {
id = "12345678"
organization_id = "123456"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "meraki_switch_organization_ports_profiles_automations" "example" {
organization_id = "123456"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import meraki_switch_organization_ports_profiles_automation.example "<organization_id>,<id>"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
resource "meraki_switch_organization_ports_profiles_automation" "example" {
organization_id = "123456"
description = "A full length description of the automation."
name = "Automation 1"
assigned_switch_ports = [
{
switch_serial = "Q234-ABCD-5678"
switch_port_ids = ["3"]
}
]
rules = [
{
priority = 1
profile_id = "32"
profile_name = "Profile 2"
conditions = [
{
attribute = "LLDP system description"
values = ["Meraki MR*"]
}
]
}
]
}
Loading

0 comments on commit b0bac13

Please sign in to comment.