1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getDataSource
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 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(custom_field_filters: Optional[Mapping[str, str]] = None,
                        enabled: Optional[bool] = None,
                        id: Optional[float] = None,
                        name: Optional[str] = None,
                        owner_id: Optional[float] = None,
                        source_url: Optional[str] = None,
                        status: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDataSourceResult
    def get_data_source_output(custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
                        enabled: pulumi.Input[Optional[bool]] = None,
                        id: pulumi.Input[Optional[float]] = None,
                        name: pulumi.Input[Optional[str]] = None,
                        owner_id: pulumi.Input[Optional[float]] = None,
                        source_url: pulumi.Input[Optional[str]] = None,
                        status: 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 dictionary
    data "netbox_get_data_source" "name" {
        # arguments
    }

    The following arguments are supported:

    CustomFieldFilters Dictionary<string, string>
    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.
    Enabled bool
    Whether NetBox synchronises from this source.
    Id double
    NetBox id.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    SourceUrl string
    URL or path of the source.
    Status string
    Synchronisation status reported by NetBox.
    CustomFieldFilters map[string]string
    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.
    Enabled bool
    Whether NetBox synchronises from this source.
    Id float64
    NetBox id.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    SourceUrl string
    URL or path of the source.
    Status string
    Synchronisation status reported by NetBox.
    custom_field_filters map(string)
    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.
    enabled bool
    Whether NetBox synchronises from this source.
    id number
    NetBox id.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    source_url string
    URL or path of the source.
    status string
    Synchronisation status reported by NetBox.
    customFieldFilters Map<String,String>
    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.
    enabled Boolean
    Whether NetBox synchronises from this source.
    id Double
    NetBox id.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    sourceUrl String
    URL or path of the source.
    status String
    Synchronisation status reported by NetBox.
    customFieldFilters {[key: string]: string}
    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.
    enabled boolean
    Whether NetBox synchronises from this source.
    id number
    NetBox id.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    sourceUrl string
    URL or path of the source.
    status string
    Synchronisation status reported by NetBox.
    custom_field_filters Mapping[str, str]
    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.
    enabled bool
    Whether NetBox synchronises from this source.
    id float
    NetBox id.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    source_url str
    URL or path of the source.
    status str
    Synchronisation status reported by NetBox.
    customFieldFilters Map<String>
    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.
    enabled Boolean
    Whether NetBox synchronises from this source.
    id Number
    NetBox id.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    sourceUrl String
    URL or path of the source.
    status String
    Synchronisation status reported by NetBox.

    getDataSource Result

    The following output properties are available:

    Comments string
    Created string
    CustomFields 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.
    FileCount double
    Number of files synced from the data source.
    Id double
    NetBox id.
    IgnoreRules string
    Newline-separated glob patterns of files to ignore when synchronising.
    LastSynced string
    When NetBox last synchronised the source.
    LastUpdated string
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Parameters string
    Backend-specific parameters as JSON text (use jsonencode()).
    SourceUrl string
    URL or path of the source.
    Status string
    Synchronisation status reported by NetBox.
    SyncInterval 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
    CustomFieldFilters Dictionary<string, string>
    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.
    Comments string
    Created string
    CustomFields 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.
    FileCount float64
    Number of files synced from the data source.
    Id float64
    NetBox id.
    IgnoreRules string
    Newline-separated glob patterns of files to ignore when synchronising.
    LastSynced string
    When NetBox last synchronised the source.
    LastUpdated string
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Parameters string
    Backend-specific parameters as JSON text (use jsonencode()).
    SourceUrl string
    URL or path of the source.
    Status string
    Synchronisation status reported by NetBox.
    SyncInterval 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
    CustomFieldFilters map[string]string
    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.
    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_filters map(string)
    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.
    comments String
    created String
    customFields 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.
    fileCount Double
    Number of files synced from the data source.
    id Double
    NetBox id.
    ignoreRules String
    Newline-separated glob patterns of files to ignore when synchronising.
    lastSynced String
    When NetBox last synchronised the source.
    lastUpdated String
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    parameters String
    Backend-specific parameters as JSON text (use jsonencode()).
    sourceUrl String
    URL or path of the source.
    status String
    Synchronisation status reported by NetBox.
    syncInterval 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
    customFieldFilters Map<String,String>
    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.
    comments string
    created string
    customFields {[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.
    fileCount number
    Number of files synced from the data source.
    id number
    NetBox id.
    ignoreRules string
    Newline-separated glob patterns of files to ignore when synchronising.
    lastSynced string
    When NetBox last synchronised the source.
    lastUpdated string
    name string
    ownerId number
    Id of the owner the object is assigned to.
    parameters string
    Backend-specific parameters as JSON text (use jsonencode()).
    sourceUrl string
    URL or path of the source.
    status string
    Synchronisation status reported by NetBox.
    syncInterval 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
    customFieldFilters {[key: string]: string}
    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.
    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_filters Mapping[str, str]
    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.
    comments String
    created String
    customFields 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.
    fileCount Number
    Number of files synced from the data source.
    id Number
    NetBox id.
    ignoreRules String
    Newline-separated glob patterns of files to ignore when synchronising.
    lastSynced String
    When NetBox last synchronised the source.
    lastUpdated String
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    parameters String
    Backend-specific parameters as JSON text (use jsonencode()).
    sourceUrl String
    URL or path of the source.
    status String
    Synchronisation status reported by NetBox.
    syncInterval 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
    customFieldFilters Map<String>
    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.

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial