Skip to content

Commit

Permalink
feat: Add netbox_dcim_platform resource
Browse files Browse the repository at this point in the history
  • Loading branch information
amhn committed Nov 18, 2022
1 parent b250d1e commit 31e5e14
Show file tree
Hide file tree
Showing 6 changed files with 545 additions and 8 deletions.
83 changes: 83 additions & 0 deletions examples/resources/netbox_dcim_platform/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
resource "netbox_dcim_platform" "platform_test" {
name = "Test platform"
slug = "Test platform"
description = "Platform for testing"
manufacturer_id = netbox_dcim_manufacturer.manufacturer_test.id

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
])
}
}
Loading

0 comments on commit 31e5e14

Please sign in to comment.