-
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 switch stack routing interface resource and data source
- Loading branch information
Showing
12 changed files
with
1,292 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,49 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "meraki_switch_stack_routing_interface Data Source - terraform-provider-meraki" | ||
subcategory: "Switches" | ||
description: |- | ||
This data source can read the Switch Stack Routing Interface configuration. | ||
--- | ||
|
||
# meraki_switch_stack_routing_interface (Data Source) | ||
|
||
This data source can read the `Switch Stack Routing Interface` configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "meraki_switch_stack_routing_interface" "example" { | ||
id = "12345678" | ||
network_id = "L_123456" | ||
switch_stack_id = "1234" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `network_id` (String) Network ID | ||
- `switch_stack_id` (String) Switch stack ID | ||
|
||
### Optional | ||
|
||
- `id` (String) The id of the object | ||
- `name` (String) A friendly name or description for the interface or VLAN. | ||
|
||
### Read-Only | ||
|
||
- `default_gateway` (String) The next hop for any traffic that isn`t going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a routed interface. | ||
- `interface_ip` (String) The IP address this switch stack will use for layer 3 routing on this VLAN or subnet. This cannot be the same as the switch`s management IP. | ||
- `ipv6_address` (String) The IPv6 address of the interface. Required if assignmentMode is `static`. Must not be included if assignmentMode is `eui-64`. | ||
- `ipv6_assignment_mode` (String) The IPv6 assignment mode for the interface. Can be either `eui-64` or `static`. | ||
- `ipv6_gateway` (String) The IPv6 default gateway of the interface. Required if prefix is defined and this is the first interface with IPv6 configured for the stack. | ||
- `ipv6_prefix` (String) The IPv6 prefix of the interface. Required if IPv6 object is included. | ||
- `multicast_routing` (String) Enable multicast support if, multicast routing between VLANs is required. Options are, `disabled`, `enabled` or `IGMP snooping querier`. Default is `disabled`. | ||
- `ospf_settings_area` (String) The OSPF area to which this interface should belong. Can be either `disabled` or the identifier of an existing OSPF area. Defaults to `disabled`. | ||
- `ospf_settings_cost` (Number) The path cost for this interface. Defaults to 1, but can be increased up to 65535 to give lower priority. | ||
- `ospf_settings_is_passive_enabled` (Boolean) When enabled, OSPF will not run on the interface, but the subnet will still be advertised. | ||
- `subnet` (String) The network that this routed interface is on, in CIDR notation (ex. 10.1.1.0/24). | ||
- `vlan_id` (Number) The VLAN this routed interface is on. VLAN must be between 1 and 4094. |
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,70 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "meraki_switch_stack_routing_interface Resource - terraform-provider-meraki" | ||
subcategory: "Switches" | ||
description: |- | ||
This resource can manage the Switch Stack Routing Interface configuration. | ||
--- | ||
|
||
# meraki_switch_stack_routing_interface (Resource) | ||
|
||
This resource can manage the `Switch Stack Routing Interface` configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "meraki_switch_stack_routing_interface" "example" { | ||
network_id = "L_123456" | ||
switch_stack_id = "1234" | ||
default_gateway = "192.168.1.1" | ||
interface_ip = "192.168.1.2" | ||
multicast_routing = "disabled" | ||
name = "L3 interface" | ||
subnet = "192.168.1.0/24" | ||
vlan_id = 100 | ||
ipv6_address = "1:2:3:4::1" | ||
ipv6_assignment_mode = "static" | ||
ipv6_gateway = "1:2:3:4::2" | ||
ipv6_prefix = "1:2:3:4::/64" | ||
ospf_settings_area = "0" | ||
ospf_settings_cost = 1 | ||
ospf_settings_is_passive_enabled = true | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) A friendly name or description for the interface or VLAN. | ||
- `network_id` (String) Network ID | ||
- `switch_stack_id` (String) Switch stack ID | ||
- `vlan_id` (Number) The VLAN this routed interface is on. VLAN must be between 1 and 4094. | ||
|
||
### Optional | ||
|
||
- `default_gateway` (String) The next hop for any traffic that isn`t going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a routed interface. | ||
- `interface_ip` (String) The IP address this switch stack will use for layer 3 routing on this VLAN or subnet. This cannot be the same as the switch`s management IP. | ||
- `ipv6_address` (String) The IPv6 address of the interface. Required if assignmentMode is `static`. Must not be included if assignmentMode is `eui-64`. | ||
- `ipv6_assignment_mode` (String) The IPv6 assignment mode for the interface. Can be either `eui-64` or `static`. | ||
- `ipv6_gateway` (String) The IPv6 default gateway of the interface. Required if prefix is defined and this is the first interface with IPv6 configured for the stack. | ||
- `ipv6_prefix` (String) The IPv6 prefix of the interface. Required if IPv6 object is included. | ||
- `multicast_routing` (String) Enable multicast support if, multicast routing between VLANs is required. Options are, `disabled`, `enabled` or `IGMP snooping querier`. Default is `disabled`. | ||
- Choices: `IGMP snooping querier`, `disabled`, `enabled` | ||
- `ospf_settings_area` (String) The OSPF area to which this interface should belong. Can be either `disabled` or the identifier of an existing OSPF area. Defaults to `disabled`. | ||
- `ospf_settings_cost` (Number) The path cost for this interface. Defaults to 1, but can be increased up to 65535 to give lower priority. | ||
- `ospf_settings_is_passive_enabled` (Boolean) When enabled, OSPF will not run on the interface, but the subnet will still be advertised. | ||
- `subnet` (String) The network that this routed interface is on, in CIDR notation (ex. 10.1.1.0/24). | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import meraki_switch_stack_routing_interface.example "<network_id>,<switch_stack_id>,<id>" | ||
``` |
5 changes: 5 additions & 0 deletions
5
examples/data-sources/meraki_switch_stack_routing_interface/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,5 @@ | ||
data "meraki_switch_stack_routing_interface" "example" { | ||
id = "12345678" | ||
network_id = "L_123456" | ||
switch_stack_id = "1234" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/meraki_switch_stack_routing_interface/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_switch_stack_routing_interface.example "<network_id>,<switch_stack_id>,<id>" |
17 changes: 17 additions & 0 deletions
17
examples/resources/meraki_switch_stack_routing_interface/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,17 @@ | ||
resource "meraki_switch_stack_routing_interface" "example" { | ||
network_id = "L_123456" | ||
switch_stack_id = "1234" | ||
default_gateway = "192.168.1.1" | ||
interface_ip = "192.168.1.2" | ||
multicast_routing = "disabled" | ||
name = "L3 interface" | ||
subnet = "192.168.1.0/24" | ||
vlan_id = 100 | ||
ipv6_address = "1:2:3:4::1" | ||
ipv6_assignment_mode = "static" | ||
ipv6_gateway = "1:2:3:4::2" | ||
ipv6_prefix = "1:2:3:4::/64" | ||
ospf_settings_area = "0" | ||
ospf_settings_cost = 1 | ||
ospf_settings_is_passive_enabled = true | ||
} |
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,105 @@ | ||
name: Switch Stack Routing Interface | ||
rest_endpoint: /networks/%v/switch/stacks/%v/routing/interfaces | ||
id_name: interfaceId | ||
data_source_name_query: true | ||
doc_category: Switches | ||
attributes: | ||
- tf_name: network_id | ||
type: String | ||
reference: true | ||
description: Network ID | ||
example: L_123456 | ||
test_value: meraki_network.test.id | ||
- tf_name: switch_stack_id | ||
type: String | ||
reference: true | ||
description: Switch stack ID | ||
example: "1234" | ||
test_value: meraki_switch_stack.test.id | ||
- model_name: defaultGateway | ||
type: String | ||
write_changes_only: true | ||
description: The next hop for any traffic that isn`t going to a directly connected subnet or over a static route. This IP address must exist in a subnet with a routed interface. | ||
example: 192.168.1.1 | ||
minimum_test_value: '"192.168.1.1"' | ||
- model_name: interfaceIp | ||
type: String | ||
description: The IP address this switch stack will use for layer 3 routing on this VLAN or subnet. This cannot be the same as the switch`s management IP. | ||
example: 192.168.1.2 | ||
minimum_test_value: '"192.168.1.2"' | ||
- model_name: multicastRouting | ||
type: String | ||
description: Enable multicast support if, multicast routing between VLANs is required. Options are, `disabled`, `enabled` or `IGMP snooping querier`. Default is `disabled`. | ||
example: disabled | ||
enum_values: [IGMP snooping querier, disabled, enabled] | ||
- model_name: name | ||
type: String | ||
mandatory: true | ||
description: A friendly name or description for the interface or VLAN. | ||
example: L3 interface | ||
- model_name: subnet | ||
type: String | ||
description: The network that this routed interface is on, in CIDR notation (ex. 10.1.1.0/24). | ||
example: 192.168.1.0/24 | ||
minimum_test_value: '"192.168.1.0/24"' | ||
- model_name: vlanId | ||
type: Int64 | ||
mandatory: true | ||
description: The VLAN this routed interface is on. VLAN must be between 1 and 4094. | ||
example: "100" | ||
- model_name: address | ||
type: String | ||
data_path: [ipv6] | ||
description: The IPv6 address of the interface. Required if assignmentMode is `static`. Must not be included if assignmentMode is `eui-64`. | ||
example: 1:2:3:4::1 | ||
- model_name: assignmentMode | ||
type: String | ||
data_path: [ipv6] | ||
description: The IPv6 assignment mode for the interface. Can be either `eui-64` or `static`. | ||
example: static | ||
- model_name: gateway | ||
type: String | ||
data_path: [ipv6] | ||
description: The IPv6 default gateway of the interface. Required if prefix is defined and this is the first interface with IPv6 configured for the stack. | ||
example: 1:2:3:4::2 | ||
- model_name: prefix | ||
type: String | ||
data_path: [ipv6] | ||
description: The IPv6 prefix of the interface. Required if IPv6 object is included. | ||
example: 1:2:3:4::/64 | ||
- model_name: area | ||
type: String | ||
data_path: [ospfSettings] | ||
exclude_test: true | ||
description: The OSPF area to which this interface should belong. Can be either `disabled` or the identifier of an existing OSPF area. Defaults to `disabled`. | ||
example: "0" | ||
- model_name: cost | ||
type: Int64 | ||
data_path: [ospfSettings] | ||
exclude_test: true | ||
description: The path cost for this interface. Defaults to 1, but can be increased up to 65535 to give lower priority. | ||
example: "1" | ||
- model_name: isPassiveEnabled | ||
type: Bool | ||
data_path: [ospfSettings] | ||
exclude_test: true | ||
description: When enabled, OSPF will not run on the interface, but the subnet will still be advertised. | ||
example: "true" | ||
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"] | ||
} | ||
resource "meraki_network_device_claim" "test" { | ||
network_id = meraki_network.test.id | ||
serials = ["Q5KD-PCG4-HB8R", "Q5KD-CU8N-DEDR"] | ||
} | ||
resource "meraki_switch_stack" "test" { | ||
network_id = meraki_network.test.id | ||
name = "A cool stack" | ||
serials = meraki_network_device_claim.test.serials | ||
} |
Oops, something went wrong.