Skip to content

Commit 190f7fa

Browse files
authored
fix(network): adjust Linux Bridge name validator to PVE UI constraint (#2762)
* fix(network): adjust Linux Bridge name validator to PVE UI constraint Signed-off-by: vaexey <110781228+vaexey@users.noreply.github.com> * fix(docs): update MarkdownDescription for Linux Bridge name; generate missing docs Signed-off-by: vaexey <110781228+vaexey@users.noreply.github.com> --------- Signed-off-by: vaexey <110781228+vaexey@users.noreply.github.com>
1 parent 7362ba5 commit 190f7fa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/resources/network_linux_bridge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Manages a Linux Bridge network interface in a Proxmox VE node.
1818

1919
### Required
2020

21-
- `name` (String) The interface name. Commonly vmbr[N], where 0 ≤ N ≤ 4094 (vmbr0 - vmbr4094), but can be any alphanumeric string that starts with a character and is at most 10 characters long.
21+
- `name` (String) The interface name. Commonly vmbr[N], where 0 ≤ N ≤ 4094 (vmbr0 - vmbr4094), but can be any string containing only letters, numbers, and underscores (_), starting with a letter and at most 10 characters long.
2222
- `node_name` (String) The name of the node.
2323

2424
### Optional

docs/resources/virtual_environment_network_linux_bridge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ resource "proxmox_virtual_environment_network_linux_vlan" "vlan99" {
5252

5353
### Required
5454

55-
- `name` (String) The interface name. Commonly vmbr[N], where 0 ≤ N ≤ 4094 (vmbr0 - vmbr4094), but can be any alphanumeric string that starts with a character and is at most 10 characters long.
55+
- `name` (String) The interface name. Commonly vmbr[N], where 0 ≤ N ≤ 4094 (vmbr0 - vmbr4094), but can be any string containing only letters, numbers, and underscores (_), starting with a letter and at most 10 characters long.
5656
- `node_name` (String) The name of the node.
5757

5858
### Optional

fwprovider/nodes/network/resource_linux_bridge.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ func (r *linuxBridgeResource) Schema(
186186
"name": schema.StringAttribute{
187187
Description: "The interface name.",
188188
MarkdownDescription: "The interface name. Commonly vmbr[N], where 0 ≤ N ≤ 4094 (vmbr0 - vmbr4094), but " +
189-
"can be any alphanumeric string that starts with a character and is at most 10 characters long.",
189+
"can be any string containing only letters, numbers, and underscores (_), starting with a letter and at most 10 characters long.",
190190
Required: true,
191191
Validators: []validator.String{
192192
stringvalidator.RegexMatches(
193-
regexp.MustCompile(`^[A-Za-z][A-Za-z0-9]{0,9}$`),
194-
`must be an alphanumeric string that starts with a character and is at most 10 characters long`,
193+
regexp.MustCompile(`^[A-Za-z][A-Za-z0-9_]{0,9}$`),
194+
`must contain only letters, numbers, and underscores (_), start with a letter, and be no longer than 10 characters`,
195195
),
196196
},
197197
PlanModifiers: []planmodifier.String{

0 commit comments

Comments
 (0)