Skip to content

Commit

Permalink
feat: Add netbox_dcim_site resource
Browse files Browse the repository at this point in the history
  • Loading branch information
amhn committed Nov 18, 2022
1 parent 4cc2b9b commit 820a3f1
Show file tree
Hide file tree
Showing 6 changed files with 802 additions and 0 deletions.
86 changes: 86 additions & 0 deletions examples/resources/netbox_dcim_site/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
resource "netbox_dcim_site" "site_test" {
name = "Test site"
slug = "Test site"
description = "site for testing"

asns = [
netbox_ipam_asn.asn_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 820a3f1

Please sign in to comment.