generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow any custom field type in netbox_devices data source
Update the data source `netbox_devices` to use the string based schema for the `custom_fields` attribute. This allows for any underlying type to be accessed by using the `jsondecode()` terraform function. For example, to access custom fields, the following code can be used. ```terraform data "netbox_devices" "test" { filter { name = "name" value = "device1" } } output "device_field" { value = jsondecode(data.netbox_devices.test[0].custom_fields).field1 } ```
- Loading branch information
Showing
3 changed files
with
21 additions
and
8 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
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