published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
A service running on a device or virtual machine (ipam.service).
From the official documentation:
An application service represents a layer seven application available on a device or virtual machine. For example, a service might be created in NetBox to represent an HTTP server running on TCP/8000. Each service may optionally be further bound to one or more specific interfaces assigned to the selected device or virtual machine.
To aid in the efficient creation of application services, users may opt to first create an application service template from which service definitions can be quickly replicated.
Changed in NetBox v4.4: Previously, application services were referred to simply as “services”. The name has been changed in the UI to better reflect their intended use. There is no change to the name of the model or in any programmatic NetBox APIs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getService({
name: "test-service",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_service(name="test-service")
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.LookupService(ctx, &netbox.LookupServiceArgs{
Name: pulumi.StringRef("test-service"),
}, 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.GetService.Invoke(new()
{
Name = "test-service",
});
});
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.GetServiceArgs;
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.getService(GetServiceArgs.builder()
.name("test-service")
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getService
arguments:
name: test-service
Example coming soon!
Using getService
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 getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOutputOptions): Output<GetServiceResult>def get_service(custom_field_filters: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_id: Optional[float] = None,
id: Optional[float] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
protocol: Optional[str] = None,
tag_slug: Optional[str] = None,
virtual_machine_id: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceResult
def get_service_output(custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
description: pulumi.Input[Optional[str]] = None,
device_id: pulumi.Input[Optional[float]] = None,
id: pulumi.Input[Optional[float]] = None,
name: pulumi.Input[Optional[str]] = None,
owner_id: pulumi.Input[Optional[float]] = None,
protocol: pulumi.Input[Optional[str]] = None,
tag_slug: pulumi.Input[Optional[str]] = None,
virtual_machine_id: pulumi.Input[Optional[float]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetServiceResult]func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput> Note: This function is named LookupService in the Go SDK.
public static class GetService
{
public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getService:getService
arguments:
# arguments dictionarydata "netbox_get_service" "name" {
# arguments
}The following arguments are supported:
- 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
- Device
Id double - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- Id double
- NetBox id.
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Protocol string
- Transport protocol. One of: tcp, udp, sctp.
- string
- Slug of a tag the object carries.
- Virtual
Machine doubleId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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
- Device
Id float64 - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- Id float64
- NetBox id.
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Protocol string
- Transport protocol. One of: tcp, udp, sctp.
- string
- Slug of a tag the object carries.
- Virtual
Machine float64Id - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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
- device_
id number - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id number
- NetBox id.
- name string
- owner_
id number - Id of the owner the object is assigned to.
- protocol string
- Transport protocol. One of: tcp, udp, sctp.
- tag_
slug string - Slug of a tag the object carries.
- virtual_
machine_ numberid - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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
- device
Id Double - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id Double
- NetBox id.
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- protocol String
- Transport protocol. One of: tcp, udp, sctp.
- String
- Slug of a tag the object carries.
- virtual
Machine DoubleId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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
- device
Id number - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id number
- NetBox id.
- name string
- owner
Id number - Id of the owner the object is assigned to.
- protocol string
- Transport protocol. One of: tcp, udp, sctp.
- string
- Slug of a tag the object carries.
- virtual
Machine numberId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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
- device_
id float - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id float
- NetBox id.
- name str
- owner_
id float - Id of the owner the object is assigned to.
- protocol str
- Transport protocol. One of: tcp, udp, sctp.
- tag_
slug str - Slug of a tag the object carries.
- virtual_
machine_ floatid - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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
- device
Id Number - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id Number
- NetBox id.
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- protocol String
- Transport protocol. One of: tcp, udp, sctp.
- String
- Slug of a tag the object carries.
- virtual
Machine NumberId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
getService 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
- Device
Id double - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- Id double
- NetBox id.
- Ip
Address List<double>Ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- Last
Updated string - Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Parent
Object doubleId - Id of the object named by parentobjecttype.
- Parent
Object stringType - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- Ports List<double>
- Port numbers the service listens on.
- Protocol string
- Transport protocol. One of: tcp, udp, sctp.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Virtual
Machine doubleId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- string
- Slug 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
- Device
Id float64 - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- Id float64
- NetBox id.
- Ip
Address []float64Ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- Last
Updated string - Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Parent
Object float64Id - Id of the object named by parentobjecttype.
- Parent
Object stringType - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- Ports []float64
- Port numbers the service listens on.
- Protocol string
- Transport protocol. One of: tcp, udp, sctp.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Virtual
Machine float64Id - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- string
- Slug 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
- device_
id number - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id number
- NetBox id.
- ip_
address_ list(number)ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- last_
updated string - name string
- owner_
id number - Id of the owner the object is assigned to.
- parent_
object_ numberid - Id of the object named by parentobjecttype.
- parent_
object_ stringtype - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- ports list(number)
- Port numbers the service listens on.
- protocol string
- Transport protocol. One of: tcp, udp, sctp.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- virtual_
machine_ numberid - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- tag_
slug string - Slug 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
- device
Id Double - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id Double
- NetBox id.
- ip
Address List<Double>Ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- last
Updated String - name String
- owner
Id Double - Id of the owner the object is assigned to.
- parent
Object DoubleId - Id of the object named by parentobjecttype.
- parent
Object StringType - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- ports List<Double>
- Port numbers the service listens on.
- protocol String
- Transport protocol. One of: tcp, udp, sctp.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- virtual
Machine DoubleId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- String
- Slug 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
- device
Id number - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id number
- NetBox id.
- ip
Address number[]Ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- last
Updated string - name string
- owner
Id number - Id of the owner the object is assigned to.
- parent
Object numberId - Id of the object named by parentobjecttype.
- parent
Object stringType - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- ports number[]
- Port numbers the service listens on.
- protocol string
- Transport protocol. One of: tcp, udp, sctp.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- virtual
Machine numberId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- string
- Slug 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
- device_
id float - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id float
- NetBox id.
- ip_
address_ Sequence[float]ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- last_
updated str - name str
- owner_
id float - Id of the owner the object is assigned to.
- parent_
object_ floatid - Id of the object named by parentobjecttype.
- parent_
object_ strtype - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- ports Sequence[float]
- Port numbers the service listens on.
- protocol str
- Transport protocol. One of: tcp, udp, sctp.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- virtual_
machine_ floatid - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- tag_
slug str - Slug 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
- device
Id Number - Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
- id Number
- NetBox id.
- ip
Address List<Number>Ids - Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
- last
Updated String - name String
- owner
Id Number - Id of the owner the object is assigned to.
- parent
Object NumberId - Id of the object named by parentobjecttype.
- parent
Object StringType - Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
- ports List<Number>
- Port numbers the service listens on.
- protocol String
- Transport protocol. One of: tcp, udp, sctp.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- virtual
Machine NumberId - Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
- 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.
- String
- Slug 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 Wednesday, Nov 4, 2026 by e-breuninger