-
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.
- Loading branch information
Showing
13 changed files
with
1,073 additions
and
1 deletion.
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
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
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,80 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "meraki_appliance_vlan_dhcp Resource - terraform-provider-meraki" | ||
subcategory: "Appliances" | ||
description: |- | ||
This resource is meant to be used in addition to the meraki_appliance_vlan resource to configure DHCP settings for a VLAN. It requires the VLAN to be already configured on the appliance. | ||
--- | ||
|
||
# meraki_appliance_vlan_dhcp (Resource) | ||
|
||
This resource is meant to be used in addition to the `meraki_appliance_vlan` resource to configure DHCP settings for a VLAN. It requires the VLAN to be already configured on the appliance. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "meraki_appliance_vlan_dhcp" "example" { | ||
network_id = "L_123456" | ||
vlan_id = "1234" | ||
dhcp_boot_options_enabled = false | ||
dhcp_handling = "Run a DHCP server" | ||
dhcp_lease_time = "1 day" | ||
dns_nameservers = "upstream_dns" | ||
mandatory_dhcp_enabled = true | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `network_id` (String) Network ID | ||
- `vlan_id` (String) The VLAN ID of the new VLAN (must be between 1 and 4094) | ||
|
||
### Optional | ||
|
||
- `dhcp_boot_filename` (String) DHCP boot option for boot filename | ||
- `dhcp_boot_next_server` (String) DHCP boot option to direct boot clients to the server to load the boot file from | ||
- `dhcp_boot_options_enabled` (Boolean) Use DHCP boot options specified in other properties | ||
- `dhcp_handling` (String) The appliance`s handling of DHCP requests on this VLAN. One of: `Run a DHCP server`, `Relay DHCP to another server` or `Do not respond to DHCP requests` | ||
- Choices: `Do not respond to DHCP requests`, `Relay DHCP to another server`, `Run a DHCP server` | ||
- `dhcp_lease_time` (String) The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: `30 minutes`, `1 hour`, `4 hours`, `12 hours`, `1 day` or `1 week` | ||
- Choices: `1 day`, `1 hour`, `1 week`, `12 hours`, `30 minutes`, `4 hours` | ||
- `dhcp_options` (Attributes List) The list of DHCP options that will be included in DHCP responses. Each object in the list should have 'code', 'type', and 'value' properties. (see [below for nested schema](#nestedatt--dhcp_options)) | ||
- `dhcp_relay_server_ips` (List of String) The IPs of the DHCP servers that DHCP requests should be relayed to | ||
- `dns_nameservers` (String) The DNS nameservers used for DHCP responses, either 'upstream_dns', 'google_dns', 'opendns', or a newline seperated string of IP addresses or domain names | ||
- `mandatory_dhcp_enabled` (Boolean) Enable Mandatory DHCP on VLAN. | ||
- `reserved_ip_ranges` (Attributes List) The DHCP reserved IP ranges on the VLAN (see [below for nested schema](#nestedatt--reserved_ip_ranges)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
<a id="nestedatt--dhcp_options"></a> | ||
### Nested Schema for `dhcp_options` | ||
|
||
Required: | ||
|
||
- `code` (String) The code for the DHCP option. This should be an integer between 2 and 254. | ||
- `type` (String) The type for the DHCP option. One of: `text`, `ip`, `hex` or `integer` | ||
- Choices: `hex`, `integer`, `ip`, `text` | ||
- `value` (String) The value for the DHCP option | ||
|
||
|
||
<a id="nestedatt--reserved_ip_ranges"></a> | ||
### Nested Schema for `reserved_ip_ranges` | ||
|
||
Required: | ||
|
||
- `comment` (String) A text comment for the reserved range | ||
- `end` (String) The last IP in the reserved range | ||
- `start` (String) The first IP in the reserved range | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import meraki_appliance_vlan_dhcp.example "<network_id>,<id>" | ||
``` |
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_appliance_vlan_dhcp.example "<network_id>,<id>" |
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,9 @@ | ||
resource "meraki_appliance_vlan_dhcp" "example" { | ||
network_id = "L_123456" | ||
vlan_id = "1234" | ||
dhcp_boot_options_enabled = false | ||
dhcp_handling = "Run a DHCP server" | ||
dhcp_lease_time = "1 day" | ||
dns_nameservers = "upstream_dns" | ||
mandatory_dhcp_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,134 @@ | ||
name: Appliance VLAN DHCP | ||
rest_endpoint: /networks/%v/appliance/vlans | ||
put_create: true | ||
no_delete: true | ||
no_data_source: true | ||
no_import: true | ||
res_description: This resource is meant to be used in addition to the `meraki_appliance_vlan` resource to configure DHCP settings for a VLAN. It requires the VLAN to be already configured on the appliance. | ||
doc_category: Appliances | ||
test_variables: [test_org, test_network] | ||
attributes: | ||
- tf_name: network_id | ||
type: String | ||
reference: true | ||
description: Network ID | ||
example: L_123456 | ||
test_value: meraki_appliance_vlans_settings.test.network_id | ||
- model_name: id | ||
tf_name: vlan_id | ||
type: String | ||
mandatory: true | ||
description: The VLAN ID of the new VLAN (must be between 1 and 4094) | ||
example: "1234" | ||
test_value: meraki_appliance_vlan.test.vlan_id | ||
- model_name: dhcpBootFilename | ||
type: String | ||
exclude_test: true | ||
description: DHCP boot option for boot filename | ||
example: sample.file | ||
- model_name: dhcpBootNextServer | ||
type: String | ||
exclude_test: true | ||
description: DHCP boot option to direct boot clients to the server to load the boot file from | ||
example: 1.2.3.4 | ||
- model_name: dhcpBootOptionsEnabled | ||
type: Bool | ||
description: Use DHCP boot options specified in other properties | ||
example: "false" | ||
- model_name: dhcpHandling | ||
type: String | ||
description: "The appliance`s handling of DHCP requests on this VLAN. One of: `Run a DHCP server`, `Relay DHCP to another server` or `Do not respond to DHCP requests`" | ||
example: Run a DHCP server | ||
enum_values: | ||
[ | ||
Do not respond to DHCP requests, | ||
Relay DHCP to another server, | ||
Run a DHCP server, | ||
] | ||
- model_name: dhcpLeaseTime | ||
type: String | ||
description: "The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: `30 minutes`, `1 hour`, `4 hours`, `12 hours`, `1 day` or `1 week`" | ||
example: 1 day | ||
enum_values: [1 day, 1 hour, 1 week, 12 hours, 30 minutes, 4 hours] | ||
- model_name: dnsNameservers | ||
type: String | ||
description: The DNS nameservers used for DHCP responses, either 'upstream_dns', 'google_dns', 'opendns', or a newline seperated string of IP addresses or domain names | ||
example: upstream_dns | ||
- model_name: enabled | ||
type: Bool | ||
data_path: [mandatoryDhcp] | ||
description: Enable Mandatory DHCP on VLAN. | ||
example: "true" | ||
- model_name: dhcpOptions | ||
type: List | ||
exclude_test: true | ||
description: The list of DHCP options that will be included in DHCP responses. Each object in the list should have 'code', 'type', and 'value' properties. | ||
attributes: | ||
- model_name: code | ||
type: String | ||
id: true | ||
mandatory: true | ||
description: The code for the DHCP option. This should be an integer between 2 and 254. | ||
example: "3" | ||
- model_name: type | ||
type: String | ||
id: true | ||
mandatory: true | ||
description: "The type for the DHCP option. One of: `text`, `ip`, `hex` or `integer`" | ||
example: text | ||
enum_values: [hex, integer, ip, text] | ||
- model_name: value | ||
type: String | ||
id: true | ||
mandatory: true | ||
description: The value for the DHCP option | ||
example: five | ||
- model_name: dhcpRelayServerIps | ||
type: List | ||
element_type: String | ||
description: The IPs of the DHCP servers that DHCP requests should be relayed to | ||
example: 192.168.2.100 | ||
exclude_test: true | ||
- model_name: reservedIpRanges | ||
type: List | ||
exclude_test: true | ||
description: The DHCP reserved IP ranges on the VLAN | ||
attributes: | ||
- model_name: comment | ||
type: String | ||
id: true | ||
mandatory: true | ||
description: A text comment for the reserved range | ||
example: A reserved IP range | ||
- model_name: end | ||
type: String | ||
id: true | ||
mandatory: true | ||
description: The last IP in the reserved range | ||
example: 192.168.1.1 | ||
- model_name: start | ||
type: String | ||
id: true | ||
mandatory: true | ||
description: The first IP in the reserved range | ||
example: 192.168.1.0 | ||
test_prerequisites: | | ||
data "meraki_organization" "test" { | ||
name = var.test_org | ||
} | ||
resource "meraki_network" "test" { | ||
organization_id = data.meraki_organization.test.id | ||
name = var.test_network | ||
product_types = ["switch", "wireless", "appliance"] | ||
} | ||
resource "meraki_appliance_vlans_settings" "test" { | ||
network_id = meraki_network.test.id | ||
vlans_enabled = true | ||
} | ||
resource "meraki_appliance_vlan" "test" { | ||
network_id = meraki_appliance_vlans_settings.test.network_id | ||
appliance_ip = "192.168.1.2" | ||
vlan_id = "1234" | ||
name = "My VLAN" | ||
subnet = "192.168.1.0/24" | ||
} |
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
Oops, something went wrong.