published on Friday, May 1, 2026 by Pulumi
published on Friday, May 1, 2026 by Pulumi
Use this resource to create and manage New Relic fleets for centralized agent management.
Fleets enable you to organize and manage New Relic agents across your infrastructure. You can create fleets for different types of infrastructure (HOST or KUBERNETESCLUSTER) and use them to centrally deploy agent configurations, manage updates, and organize your entities with tags.
Example Usage
Linux Host Fleet
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const linuxHosts = new newrelic.Fleet("linux_hosts", {
name: "Production Linux Hosts",
managedEntityType: "HOST",
operatingSystem: "LINUX",
description: "Fleet for managing Linux production hosts",
tags: [
"environment:production",
"team:platform,ops",
],
});
import pulumi
import pulumi_newrelic as newrelic
linux_hosts = newrelic.Fleet("linux_hosts",
name="Production Linux Hosts",
managed_entity_type="HOST",
operating_system="LINUX",
description="Fleet for managing Linux production hosts",
tags=[
"environment:production",
"team:platform,ops",
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewFleet(ctx, "linux_hosts", &newrelic.FleetArgs{
Name: pulumi.String("Production Linux Hosts"),
ManagedEntityType: pulumi.String("HOST"),
OperatingSystem: pulumi.String("LINUX"),
Description: pulumi.String("Fleet for managing Linux production hosts"),
Tags: pulumi.StringArray{
pulumi.String("environment:production"),
pulumi.String("team:platform,ops"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var linuxHosts = new NewRelic.Index.Fleet("linux_hosts", new()
{
Name = "Production Linux Hosts",
ManagedEntityType = "HOST",
OperatingSystem = "LINUX",
Description = "Fleet for managing Linux production hosts",
Tags = new[]
{
"environment:production",
"team:platform,ops",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.Fleet;
import com.pulumi.newrelic.FleetArgs;
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) {
var linuxHosts = new Fleet("linuxHosts", FleetArgs.builder()
.name("Production Linux Hosts")
.managedEntityType("HOST")
.operatingSystem("LINUX")
.description("Fleet for managing Linux production hosts")
.tags(
"environment:production",
"team:platform,ops")
.build());
}
}
resources:
linuxHosts:
type: newrelic:Fleet
name: linux_hosts
properties:
name: Production Linux Hosts
managedEntityType: HOST
operatingSystem: LINUX
description: Fleet for managing Linux production hosts
tags:
- environment:production
- team:platform,ops
Windows Host Fleet
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const windowsHosts = new newrelic.Fleet("windows_hosts", {
name: "Production Windows Hosts",
managedEntityType: "HOST",
operatingSystem: "WINDOWS",
description: "Fleet for managing Windows production hosts",
});
import pulumi
import pulumi_newrelic as newrelic
windows_hosts = newrelic.Fleet("windows_hosts",
name="Production Windows Hosts",
managed_entity_type="HOST",
operating_system="WINDOWS",
description="Fleet for managing Windows production hosts")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewFleet(ctx, "windows_hosts", &newrelic.FleetArgs{
Name: pulumi.String("Production Windows Hosts"),
ManagedEntityType: pulumi.String("HOST"),
OperatingSystem: pulumi.String("WINDOWS"),
Description: pulumi.String("Fleet for managing Windows production hosts"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var windowsHosts = new NewRelic.Index.Fleet("windows_hosts", new()
{
Name = "Production Windows Hosts",
ManagedEntityType = "HOST",
OperatingSystem = "WINDOWS",
Description = "Fleet for managing Windows production hosts",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.Fleet;
import com.pulumi.newrelic.FleetArgs;
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) {
var windowsHosts = new Fleet("windowsHosts", FleetArgs.builder()
.name("Production Windows Hosts")
.managedEntityType("HOST")
.operatingSystem("WINDOWS")
.description("Fleet for managing Windows production hosts")
.build());
}
}
resources:
windowsHosts:
type: newrelic:Fleet
name: windows_hosts
properties:
name: Production Windows Hosts
managedEntityType: HOST
operatingSystem: WINDOWS
description: Fleet for managing Windows production hosts
Kubernetes Cluster Fleet
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const k8sClusters = new newrelic.Fleet("k8s_clusters", {
name: "Production Kubernetes Clusters",
managedEntityType: "KUBERNETESCLUSTER",
description: "Fleet for managing Kubernetes clusters",
tags: ["environment:production"],
});
import pulumi
import pulumi_newrelic as newrelic
k8s_clusters = newrelic.Fleet("k8s_clusters",
name="Production Kubernetes Clusters",
managed_entity_type="KUBERNETESCLUSTER",
description="Fleet for managing Kubernetes clusters",
tags=["environment:production"])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewFleet(ctx, "k8s_clusters", &newrelic.FleetArgs{
Name: pulumi.String("Production Kubernetes Clusters"),
ManagedEntityType: pulumi.String("KUBERNETESCLUSTER"),
Description: pulumi.String("Fleet for managing Kubernetes clusters"),
Tags: pulumi.StringArray{
pulumi.String("environment:production"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var k8sClusters = new NewRelic.Index.Fleet("k8s_clusters", new()
{
Name = "Production Kubernetes Clusters",
ManagedEntityType = "KUBERNETESCLUSTER",
Description = "Fleet for managing Kubernetes clusters",
Tags = new[]
{
"environment:production",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.Fleet;
import com.pulumi.newrelic.FleetArgs;
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) {
var k8sClusters = new Fleet("k8sClusters", FleetArgs.builder()
.name("Production Kubernetes Clusters")
.managedEntityType("KUBERNETESCLUSTER")
.description("Fleet for managing Kubernetes clusters")
.tags("environment:production")
.build());
}
}
resources:
k8sClusters:
type: newrelic:Fleet
name: k8s_clusters
properties:
name: Production Kubernetes Clusters
managedEntityType: KUBERNETESCLUSTER
description: Fleet for managing Kubernetes clusters
tags:
- environment:production
Create Fleet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Fleet(name: string, args: FleetArgs, opts?: CustomResourceOptions);@overload
def Fleet(resource_name: str,
args: FleetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Fleet(resource_name: str,
opts: Optional[ResourceOptions] = None,
managed_entity_type: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
operating_system: Optional[str] = None,
organization_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewFleet(ctx *Context, name string, args FleetArgs, opts ...ResourceOption) (*Fleet, error)public Fleet(string name, FleetArgs args, CustomResourceOptions? opts = null)type: newrelic:Fleet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FleetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FleetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FleetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FleetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FleetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var fleetResource = new NewRelic.Fleet("fleetResource", new()
{
ManagedEntityType = "string",
Description = "string",
Name = "string",
OperatingSystem = "string",
OrganizationId = "string",
Tags = new[]
{
"string",
},
});
example, err := newrelic.NewFleet(ctx, "fleetResource", &newrelic.FleetArgs{
ManagedEntityType: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
OperatingSystem: pulumi.String("string"),
OrganizationId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var fleetResource = new Fleet("fleetResource", FleetArgs.builder()
.managedEntityType("string")
.description("string")
.name("string")
.operatingSystem("string")
.organizationId("string")
.tags("string")
.build());
fleet_resource = newrelic.Fleet("fleetResource",
managed_entity_type="string",
description="string",
name="string",
operating_system="string",
organization_id="string",
tags=["string"])
const fleetResource = new newrelic.Fleet("fleetResource", {
managedEntityType: "string",
description: "string",
name: "string",
operatingSystem: "string",
organizationId: "string",
tags: ["string"],
});
type: newrelic:Fleet
properties:
description: string
managedEntityType: string
name: string
operatingSystem: string
organizationId: string
tags:
- string
Fleet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Fleet resource accepts the following input properties:
- Managed
Entity stringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Description string
- A description of the fleet. This can be updated after creation.
- Name string
- The name of the fleet. This can be changed after creation.
- Operating
System string - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Organization
Id string - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- List<string>
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- Managed
Entity stringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Description string
- A description of the fleet. This can be updated after creation.
- Name string
- The name of the fleet. This can be changed after creation.
- Operating
System string - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Organization
Id string - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- []string
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- managed
Entity StringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - description String
- A description of the fleet. This can be updated after creation.
- name String
- The name of the fleet. This can be changed after creation.
- operating
System String - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization
Id String - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- List<String>
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- managed
Entity stringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - description string
- A description of the fleet. This can be updated after creation.
- name string
- The name of the fleet. This can be changed after creation.
- operating
System string - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization
Id string - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- string[]
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- managed_
entity_ strtype - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - description str
- A description of the fleet. This can be updated after creation.
- name str
- The name of the fleet. This can be changed after creation.
- operating_
system str - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization_
id str - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- Sequence[str]
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- managed
Entity StringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - description String
- A description of the fleet. This can be updated after creation.
- name String
- The name of the fleet. This can be changed after creation.
- operating
System String - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization
Id String - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- List<String>
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
Outputs
All input properties are implicitly available as output properties. Additionally, the Fleet resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Fleet Resource
Get an existing Fleet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FleetState, opts?: CustomResourceOptions): Fleet@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
managed_entity_type: Optional[str] = None,
name: Optional[str] = None,
operating_system: Optional[str] = None,
organization_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> Fleetfunc GetFleet(ctx *Context, name string, id IDInput, state *FleetState, opts ...ResourceOption) (*Fleet, error)public static Fleet Get(string name, Input<string> id, FleetState? state, CustomResourceOptions? opts = null)public static Fleet get(String name, Output<String> id, FleetState state, CustomResourceOptions options)resources: _: type: newrelic:Fleet get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- A description of the fleet. This can be updated after creation.
- Managed
Entity stringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Name string
- The name of the fleet. This can be changed after creation.
- Operating
System string - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Organization
Id string - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- List<string>
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- Description string
- A description of the fleet. This can be updated after creation.
- Managed
Entity stringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Name string
- The name of the fleet. This can be changed after creation.
- Operating
System string - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - Organization
Id string - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- []string
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- description String
- A description of the fleet. This can be updated after creation.
- managed
Entity StringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - name String
- The name of the fleet. This can be changed after creation.
- operating
System String - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization
Id String - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- List<String>
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- description string
- A description of the fleet. This can be updated after creation.
- managed
Entity stringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - name string
- The name of the fleet. This can be changed after creation.
- operating
System string - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization
Id string - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- string[]
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- description str
- A description of the fleet. This can be updated after creation.
- managed_
entity_ strtype - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - name str
- The name of the fleet. This can be changed after creation.
- operating_
system str - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization_
id str - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- Sequence[str]
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
- description String
- A description of the fleet. This can be updated after creation.
- managed
Entity StringType - The type of entities this fleet will manage. Valid values are
HOSTorKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - name String
- The name of the fleet. This can be changed after creation.
- operating
System String - The operating system type for HOST fleets. Required when
managedEntityTypeisHOST. Valid values areLINUXorWINDOWS. Must not be set whenmanagedEntityTypeisKUBERNETESCLUSTER. Note: This cannot be changed after creation (forces new resource). - organization
Id String - The organization ID. If not provided, it will be automatically fetched from your account. Note: This cannot be changed after creation (forces new resource).
- List<String>
- A list of tags for the fleet. Each tag should be in the format
"key:value1,value2"where multiple values can be comma-separated.
Import
Fleets can be imported using the fleet ID:
$ pulumi import newrelic:index/fleet:Fleet linux_hosts <fleet_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
published on Friday, May 1, 2026 by Pulumi
