published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
A NetBox data source (core.datasource): a git repository, S3 bucket or local path NetBox synchronises files from.
From the official documentation:
A data source represents some external repository of data which NetBox can consume, such as a git repository. Files within the data source are synchronized to NetBox by saving them in the database as data file objects.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getDataSource({
name: "test-data_source",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_data_source(name="test-data_source")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v6/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.LookupDataSource(ctx, &netbox.LookupDataSourceArgs{
Name: pulumi.StringRef("test-data_source"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var test = Netbox.GetDataSource.Invoke(new()
{
Name = "test-data_source",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.NetboxFunctions;
import com.pulumi.netbox.inputs.GetDataSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = NetboxFunctions.getDataSource(GetDataSourceArgs.builder()
.name("test-data_source")
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getDataSource
arguments:
name: test-data_source
Example coming soon!
Using getDataSource
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDataSource(args: GetDataSourceArgs, opts?: InvokeOptions): Promise<GetDataSourceResult>
function getDataSourceOutput(args: GetDataSourceOutputArgs, opts?: InvokeOutputOptions): Output<GetDataSourceResult>def get_data_source(created: Optional[str] = None,
custom_field_filters: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
id: Optional[float] = None,
last_synced: Optional[str] = None,
last_updated: Optional[str] = None,
name: Optional[str] = None,
owner_group_id: Optional[float] = None,
owner_group_name: Optional[str] = None,
owner_id: Optional[float] = None,
owner_name: Optional[str] = None,
q: Optional[str] = None,
source_url: Optional[str] = None,
status: Optional[str] = None,
sync_interval: Optional[float] = None,
tag: Optional[str] = None,
tag_id: Optional[float] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDataSourceResult
def get_data_source_output(created: pulumi.Input[Optional[str]] = None,
custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
description: pulumi.Input[Optional[str]] = None,
enabled: pulumi.Input[Optional[bool]] = None,
id: pulumi.Input[Optional[float]] = None,
last_synced: pulumi.Input[Optional[str]] = None,
last_updated: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
owner_group_id: pulumi.Input[Optional[float]] = None,
owner_group_name: pulumi.Input[Optional[str]] = None,
owner_id: pulumi.Input[Optional[float]] = None,
owner_name: pulumi.Input[Optional[str]] = None,
q: pulumi.Input[Optional[str]] = None,
source_url: pulumi.Input[Optional[str]] = None,
status: pulumi.Input[Optional[str]] = None,
sync_interval: pulumi.Input[Optional[float]] = None,
tag: pulumi.Input[Optional[str]] = None,
tag_id: pulumi.Input[Optional[float]] = None,
type: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetDataSourceResult]func LookupDataSource(ctx *Context, args *LookupDataSourceArgs, opts ...InvokeOption) (*LookupDataSourceResult, error)
func LookupDataSourceOutput(ctx *Context, args *LookupDataSourceOutputArgs, opts ...InvokeOption) LookupDataSourceResultOutput> Note: This function is named LookupDataSource in the Go SDK.
public static class GetDataSource
{
public static Task<GetDataSourceResult> InvokeAsync(GetDataSourceArgs args, InvokeOptions? opts = null)
public static Output<GetDataSourceResult> Invoke(GetDataSourceInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetDataSourceResult> Invoke(GetDataSourceInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOptions options)
public static Output<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOptions options)
public static Output<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getDataSource:getDataSource
arguments:
# arguments dictionarydata "netbox_get_data_source" "name" {
# arguments
}The following arguments are supported:
- Created string
- Custom
Field Dictionary<string, string>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- Description string
- Enabled bool
- Whether NetBox synchronises from this source.
- Id double
- NetBox id.
- Last
Synced string - When NetBox last synchronised the source.
- Last
Updated string - Name string
- Owner
Group doubleId - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id double - Id of the owner the object is assigned to.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Source
Url string - URL or path of the source.
- Status string
- Synchronisation status reported by NetBox.
- Sync
Interval double - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- Tag string
- Slug of a tag the object carries.
- Tag
Id double - Id of a tag the object carries.
- Type string
- Kind of backing store. One of: local, git, amazon-s3.
- Created string
- Custom
Field map[string]stringFilters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- Description string
- Enabled bool
- Whether NetBox synchronises from this source.
- Id float64
- NetBox id.
- Last
Synced string - When NetBox last synchronised the source.
- Last
Updated string - Name string
- Owner
Group float64Id - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Id float64 - Id of the owner the object is assigned to.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Source
Url string - URL or path of the source.
- Status string
- Synchronisation status reported by NetBox.
- Sync
Interval float64 - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- Tag string
- Slug of a tag the object carries.
- Tag
Id float64 - Id of a tag the object carries.
- Type string
- Kind of backing store. One of: local, git, amazon-s3.
- created string
- custom_
field_ map(string)filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- description string
- enabled bool
- Whether NetBox synchronises from this source.
- id number
- NetBox id.
- last_
synced string - When NetBox last synchronised the source.
- last_
updated string - name string
- owner_
group_ numberid - Id of the owner group.
- owner_
group_ stringname - Name of the owner group.
- owner_
id number - Id of the owner the object is assigned to.
- owner_
name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- source_
url string - URL or path of the source.
- status string
- Synchronisation status reported by NetBox.
- sync_
interval number - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- tag string
- Slug of a tag the object carries.
- tag_
id number - Id of a tag the object carries.
- type string
- Kind of backing store. One of: local, git, amazon-s3.
- created String
- custom
Field Map<String,String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- description String
- enabled Boolean
- Whether NetBox synchronises from this source.
- id Double
- NetBox id.
- last
Synced String - When NetBox last synchronised the source.
- last
Updated String - name String
- owner
Group DoubleId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Double - Id of the owner the object is assigned to.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- source
Url String - URL or path of the source.
- status String
- Synchronisation status reported by NetBox.
- sync
Interval Double - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- tag String
- Slug of a tag the object carries.
- tag
Id Double - Id of a tag the object carries.
- type String
- Kind of backing store. One of: local, git, amazon-s3.
- created string
- custom
Field {[key: string]: string}Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- description string
- enabled boolean
- Whether NetBox synchronises from this source.
- id number
- NetBox id.
- last
Synced string - When NetBox last synchronised the source.
- last
Updated string - name string
- owner
Group numberId - Id of the owner group.
- owner
Group stringName - Name of the owner group.
- owner
Id number - Id of the owner the object is assigned to.
- owner
Name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- source
Url string - URL or path of the source.
- status string
- Synchronisation status reported by NetBox.
- sync
Interval number - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- tag string
- Slug of a tag the object carries.
- tag
Id number - Id of a tag the object carries.
- type string
- Kind of backing store. One of: local, git, amazon-s3.
- created str
- custom_
field_ Mapping[str, str]filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- description str
- enabled bool
- Whether NetBox synchronises from this source.
- id float
- NetBox id.
- last_
synced str - When NetBox last synchronised the source.
- last_
updated str - name str
- owner_
group_ floatid - Id of the owner group.
- owner_
group_ strname - Name of the owner group.
- owner_
id float - Id of the owner the object is assigned to.
- owner_
name str - Name of the owner.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- source_
url str - URL or path of the source.
- status str
- Synchronisation status reported by NetBox.
- sync_
interval float - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- tag str
- Slug of a tag the object carries.
- tag_
id float - Id of a tag the object carries.
- type str
- Kind of backing store. One of: local, git, amazon-s3.
- created String
- custom
Field Map<String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- description String
- enabled Boolean
- Whether NetBox synchronises from this source.
- id Number
- NetBox id.
- last
Synced String - When NetBox last synchronised the source.
- last
Updated String - name String
- owner
Group NumberId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Id Number - Id of the owner the object is assigned to.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- source
Url String - URL or path of the source.
- status String
- Synchronisation status reported by NetBox.
- sync
Interval Number - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- tag String
- Slug of a tag the object carries.
- tag
Id Number - Id of a tag the object carries.
- type String
- Kind of backing store. One of: local, git, amazon-s3.
getDataSource Result
The following output properties are available:
- Comments string
- Created string
- Custom
Fields Dictionary<string, string> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Enabled bool
- Whether NetBox synchronises from this source.
- File
Count double - Number of files synced from the data source.
- Id double
- NetBox id.
- Ignore
Rules string - Newline-separated glob patterns of files to ignore when synchronising.
- Last
Synced string - When NetBox last synchronised the source.
- Last
Updated string - Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Parameters string
- Backend-specific parameters as JSON text (use jsonencode()).
- Source
Url string - URL or path of the source.
- Status string
- Synchronisation status reported by NetBox.
- Sync
Interval double - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- Type string
- Kind of backing store. One of: local, git, amazon-s3.
- Url string
- Custom
Field Dictionary<string, string>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- Owner
Group doubleId - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Tag string
- Slug of a tag the object carries.
- Tag
Id double - Id of a tag the object carries.
- Comments string
- Created string
- Custom
Fields map[string]string - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Enabled bool
- Whether NetBox synchronises from this source.
- File
Count float64 - Number of files synced from the data source.
- Id float64
- NetBox id.
- Ignore
Rules string - Newline-separated glob patterns of files to ignore when synchronising.
- Last
Synced string - When NetBox last synchronised the source.
- Last
Updated string - Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Parameters string
- Backend-specific parameters as JSON text (use jsonencode()).
- Source
Url string - URL or path of the source.
- Status string
- Synchronisation status reported by NetBox.
- Sync
Interval float64 - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- Type string
- Kind of backing store. One of: local, git, amazon-s3.
- Url string
- Custom
Field map[string]stringFilters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- Owner
Group float64Id - Id of the owner group.
- Owner
Group stringName - Name of the owner group.
- Owner
Name string - Name of the owner.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Tag string
- Slug of a tag the object carries.
- Tag
Id float64 - Id of a tag the object carries.
- comments string
- created string
- custom_
fields map(string) - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- enabled bool
- Whether NetBox synchronises from this source.
- file_
count number - Number of files synced from the data source.
- id number
- NetBox id.
- ignore_
rules string - Newline-separated glob patterns of files to ignore when synchronising.
- last_
synced string - When NetBox last synchronised the source.
- last_
updated string - name string
- owner_
id number - Id of the owner the object is assigned to.
- parameters string
- Backend-specific parameters as JSON text (use jsonencode()).
- source_
url string - URL or path of the source.
- status string
- Synchronisation status reported by NetBox.
- sync_
interval number - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- type string
- Kind of backing store. One of: local, git, amazon-s3.
- url string
- custom_
field_ map(string)filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- owner_
group_ numberid - Id of the owner group.
- owner_
group_ stringname - Name of the owner group.
- owner_
name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- tag string
- Slug of a tag the object carries.
- tag_
id number - Id of a tag the object carries.
- comments String
- created String
- custom
Fields Map<String,String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- enabled Boolean
- Whether NetBox synchronises from this source.
- file
Count Double - Number of files synced from the data source.
- id Double
- NetBox id.
- ignore
Rules String - Newline-separated glob patterns of files to ignore when synchronising.
- last
Synced String - When NetBox last synchronised the source.
- last
Updated String - name String
- owner
Id Double - Id of the owner the object is assigned to.
- parameters String
- Backend-specific parameters as JSON text (use jsonencode()).
- source
Url String - URL or path of the source.
- status String
- Synchronisation status reported by NetBox.
- sync
Interval Double - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- type String
- Kind of backing store. One of: local, git, amazon-s3.
- url String
- custom
Field Map<String,String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- owner
Group DoubleId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- tag String
- Slug of a tag the object carries.
- tag
Id Double - Id of a tag the object carries.
- comments string
- created string
- custom
Fields {[key: string]: string} - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- enabled boolean
- Whether NetBox synchronises from this source.
- file
Count number - Number of files synced from the data source.
- id number
- NetBox id.
- ignore
Rules string - Newline-separated glob patterns of files to ignore when synchronising.
- last
Synced string - When NetBox last synchronised the source.
- last
Updated string - name string
- owner
Id number - Id of the owner the object is assigned to.
- parameters string
- Backend-specific parameters as JSON text (use jsonencode()).
- source
Url string - URL or path of the source.
- status string
- Synchronisation status reported by NetBox.
- sync
Interval number - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- type string
- Kind of backing store. One of: local, git, amazon-s3.
- url string
- custom
Field {[key: string]: string}Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- owner
Group numberId - Id of the owner group.
- owner
Group stringName - Name of the owner group.
- owner
Name string - Name of the owner.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- tag string
- Slug of a tag the object carries.
- tag
Id number - Id of a tag the object carries.
- comments str
- created str
- custom_
fields Mapping[str, str] - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description str
- enabled bool
- Whether NetBox synchronises from this source.
- file_
count float - Number of files synced from the data source.
- id float
- NetBox id.
- ignore_
rules str - Newline-separated glob patterns of files to ignore when synchronising.
- last_
synced str - When NetBox last synchronised the source.
- last_
updated str - name str
- owner_
id float - Id of the owner the object is assigned to.
- parameters str
- Backend-specific parameters as JSON text (use jsonencode()).
- source_
url str - URL or path of the source.
- status str
- Synchronisation status reported by NetBox.
- sync_
interval float - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- type str
- Kind of backing store. One of: local, git, amazon-s3.
- url str
- custom_
field_ Mapping[str, str]filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- owner_
group_ floatid - Id of the owner group.
- owner_
group_ strname - Name of the owner group.
- owner_
name str - Name of the owner.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- tag str
- Slug of a tag the object carries.
- tag_
id float - Id of a tag the object carries.
- comments String
- created String
- custom
Fields Map<String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- enabled Boolean
- Whether NetBox synchronises from this source.
- file
Count Number - Number of files synced from the data source.
- id Number
- NetBox id.
- ignore
Rules String - Newline-separated glob patterns of files to ignore when synchronising.
- last
Synced String - When NetBox last synchronised the source.
- last
Updated String - name String
- owner
Id Number - Id of the owner the object is assigned to.
- parameters String
- Backend-specific parameters as JSON text (use jsonencode()).
- source
Url String - URL or path of the source.
- status String
- Synchronisation status reported by NetBox.
- sync
Interval Number - Automatic synchronisation interval in minutes. One of: 1, 60, 720, 1440, 10080, 43200.
- type String
- Kind of backing store. One of: local, git, amazon-s3.
- url String
- custom
Field Map<String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- owner
Group NumberId - Id of the owner group.
- owner
Group StringName - Name of the owner group.
- owner
Name String - Name of the owner.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- tag String
- Slug of a tag the object carries.
- tag
Id Number - Id of a tag the object carries.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
published on Monday, Nov 16, 2026 by e-breuninger