-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add scope field to VLAN group resource
Fixes: 193
- Loading branch information
Showing
5 changed files
with
482 additions
and
34 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
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,2 @@ | ||
# VLAN groups can be imported by id | ||
terraform import netbox_ipam_vlan_group.vlan_group_test 1 |
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 |
---|---|---|
@@ -1,9 +1,89 @@ | ||
resource "netbox_ipam_vlan_group" "vlan_group_test" { | ||
name = "TestVlanGroup" | ||
slug = "TestVlanGroup" | ||
description = "Vlan group created by terraform" | ||
max_vid = 4094 | ||
min_vid = 1 | ||
|
||
scope { | ||
id = 1 | ||
type = "dcim.site" | ||
} | ||
|
||
tag { | ||
name = "tag1" | ||
slug = "tag1" | ||
} | ||
|
||
custom_field { | ||
name = "cf_boolean" | ||
type = "boolean" | ||
value = "true" | ||
} | ||
|
||
custom_field { | ||
name = "cf_date" | ||
type = "date" | ||
value = "2020-12-25" | ||
} | ||
|
||
custom_field { | ||
name = "cf_text" | ||
type = "text" | ||
value = "some text" | ||
} | ||
|
||
custom_field { | ||
name = "cf_integer" | ||
type = "integer" | ||
value = "10" | ||
} | ||
|
||
custom_field { | ||
name = "cf_selection" | ||
type = "select" | ||
value = "1" | ||
} | ||
|
||
custom_field { | ||
name = "cf_url" | ||
type = "url" | ||
value = "https://github.com" | ||
} | ||
|
||
custom_field { | ||
name = "cf_multi_selection" | ||
type = "multiselect" | ||
value = jsonencode([ | ||
"0", | ||
"1" | ||
]) | ||
} | ||
|
||
custom_field { | ||
name = "cf_json" | ||
type = "json" | ||
value = jsonencode({ | ||
stringvalue = "string" | ||
boolvalue = false | ||
dictionary = { | ||
numbervalue = 5 | ||
} | ||
}) | ||
} | ||
|
||
custom_field { | ||
name = "cf_object" | ||
type = "object" | ||
value = 1 | ||
} | ||
|
||
custom_field { | ||
name = "cf_multi_object" | ||
type = "multiobject" | ||
value = jsonencode([ | ||
1, | ||
2 | ||
]) | ||
} | ||
} |
Oops, something went wrong.