Skip to content

Commit

Permalink
chore: Make docs and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fbreckle committed Jul 10, 2023
1 parent e48bb9f commit b2c5fa1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion docs/resources/virtual_machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ resource "netbox_virtual_machine" "full_vm" {
vcpus = "2"
role_id = 31 // This corresponds to the Netbox ID for a given role
tenant_id = data.netbox_tenant.customer_a.id
local_context_data = jsonencode({
"setting_a" = "Some Setting"
"setting_b" = 42
})
}
```

Expand All @@ -72,6 +76,7 @@ resource "netbox_virtual_machine" "full_vm" {
- `custom_fields` (Map of String)
- `device_id` (Number)
- `disk_size_gb` (Number)
- `local_context_data` (String) This is best managed through the use of `jsonencode` and a map of settings.
- `memory_mb` (Number)
- `platform_id` (Number)
- `role_id` (Number)
Expand All @@ -80,7 +85,6 @@ resource "netbox_virtual_machine" "full_vm" {
- `tags` (Set of String)
- `tenant_id` (Number)
- `vcpus` (Number)
- `local_context_data` (String) This is best managed through the use of `jsonencode` and a map of settings.

### Read-Only

Expand Down
2 changes: 1 addition & 1 deletion netbox/data_source_netbox_ip_addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func dataSourceNetboxIpAddressesRead(d *schema.ResourceData, m interface{}) erro
mapping["dns_name"] = v.DNSName
mapping["tenant"] = flattenTenant(v.Tenant)
var stags []map[string]interface{}
for _,t := range v.Tags {
for _, t := range v.Tags {
var tagmapping = make(map[string]interface{})
tagmapping["name"] = t.Name
tagmapping["display"] = t.Display
Expand Down
5 changes: 3 additions & 2 deletions netbox/resource_netbox_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ func resourceNetboxVirtualMachine() *schema.Resource {
Computed: true,
},
"local_context_data": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: "This is best managed through the use of `jsonencode` and a map of settings.",
},
customFieldsKey: customFieldsSchema,
},
Expand Down

0 comments on commit b2c5fa1

Please sign in to comment.