import * as pulumi from "@pulumi/pulumi"; /** * Use this resource to create and manage New Relic fleet configurations for centralized agent management. * * A fleet configuration holds versioned agent settings. The configuration content is immutable — each change to `configurationContent` creates a new version on the API automatically, similar to how AWS launch templates work. The resource ID (the configuration entity GUID) never changes across updates. Use the `newrelic.FleetConfiguration` data source to access the content of a specific historical version. * * ## Example Usage * * ### Basic Infrastructure Agent Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const infra = new newrelic.FleetConfiguration("infra", { * name: "Production Infrastructure Config", * agentType: "NRInfra", * managedEntityType: "HOST", * operatingSystem: "LINUX", * configurationContent: `log: * level: info * file: /var/log/newrelic-infra/newrelic-infra.log * metrics: * enabled: true * system_sample_rate: 15 * `, * }); * ``` * * ## Out-of-band drift warnings * * If a version is deleted outside of Terraform (UI, API, or another tool), the next `plan` or `refresh` will surface a warning so you understand why state changed: * * If the previously-tracked **latest** version was the one deleted, an additional, stronger warning fires explaining that `configurationContent` has been refreshed from the new latest version on the API. If your declared content differs from that new latest, the next `apply` will create a new version restoring your declared content — this is the expected, self-healing behavior. * * ## Import * * Fleet configurations can be imported using a composite ID of `:`: * * ```sh * $ pulumi import newrelic:index/fleetConfiguration:FleetConfiguration infra :HOST * $ pulumi import newrelic:index/fleetConfiguration:FleetConfiguration infra :KUBERNETESCLUSTER * ``` * * The `managedEntityType` portion is required because the New Relic API does not return it via the entity lookup query (a GraphQL schema constraint). All other attributes — `name`, `agentType`, `operatingSystem`, `organizationId`, `configurationContent` — are resolved automatically from the API. */ export declare class FleetConfiguration extends pulumi.CustomResource { /** * Get an existing FleetConfiguration resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: FleetConfigurationState, opts?: pulumi.CustomResourceOptions): FleetConfiguration; /** * Returns true if the given object is an instance of FleetConfiguration. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is FleetConfiguration; /** * The type of agent this configuration is for. Valid values: `NRInfra`, `NRDOT`, `FluentBit`, `NRPrometheusAgent`. **Cannot be changed after creation.** */ readonly agentType: pulumi.Output; /** * The YAML or JSON content for this configuration. Use `file()` to load content from a file. Each change to this field creates a new immutable version on the API; the resource ID remains constant. */ readonly configurationContent: pulumi.Output; /** * The entity GUID of the configuration. */ readonly configurationId: pulumi.Output; /** * The configuration type. Currently only `AgentConfig` is a supported value, and it is the default — a fleet configuration can no longer be created with a null configuration type through this argument. Use `legacyConfig = true` instead to create a legacy configuration. Mutually exclusive with `legacyConfig`. This is an interim restriction pending further product guidance and may change. **Cannot be changed after creation.** */ readonly configurationType: pulumi.Output; /** * The entity GUID of the highest-numbered version. */ readonly latestVersionEntityId: pulumi.Output; /** * The highest version number across all versions created so far. */ readonly latestVersionNumber: pulumi.Output; /** * Set to `true` to create a legacy configuration with no configuration type (null), instead of the `"AgentConfig"` default. Mutually exclusive with `configurationType`. **Cannot be changed after creation.** */ readonly legacyConfig: pulumi.Output; /** * The type of entities this configuration manages. Valid values: `HOST`, `KUBERNETESCLUSTER`. **Cannot be changed after creation.** */ readonly managedEntityType: pulumi.Output; /** * The name of the configuration. **Changing this forces resource recreation** — the API does not support renaming a configuration in place. */ readonly name: pulumi.Output; /** * The operating system this configuration targets. Valid values: `LINUX`, `WINDOWS`. Applicable to `HOST` configurations only — must not be set when `managedEntityType` is `KUBERNETESCLUSTER`. **Cannot be changed after creation.** */ readonly operatingSystem: pulumi.Output; /** * The organization ID. Auto-fetched from the account when not provided. **Cannot be changed after creation.** */ readonly organizationId: pulumi.Output; /** * Total number of versions currently in the configuration. */ readonly totalVersions: pulumi.Output; /** * A list of entity GUIDs for all versions, sorted oldest-first. Use with the `newrelic.FleetConfiguration` data source to retrieve the content of a specific historical version. */ readonly versionEntityIds: pulumi.Output; /** * Create a FleetConfiguration resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: FleetConfigurationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FleetConfiguration resources. */ export interface FleetConfigurationState { /** * The type of agent this configuration is for. Valid values: `NRInfra`, `NRDOT`, `FluentBit`, `NRPrometheusAgent`. **Cannot be changed after creation.** */ agentType?: pulumi.Input; /** * The YAML or JSON content for this configuration. Use `file()` to load content from a file. Each change to this field creates a new immutable version on the API; the resource ID remains constant. */ configurationContent?: pulumi.Input; /** * The entity GUID of the configuration. */ configurationId?: pulumi.Input; /** * The configuration type. Currently only `AgentConfig` is a supported value, and it is the default — a fleet configuration can no longer be created with a null configuration type through this argument. Use `legacyConfig = true` instead to create a legacy configuration. Mutually exclusive with `legacyConfig`. This is an interim restriction pending further product guidance and may change. **Cannot be changed after creation.** */ configurationType?: pulumi.Input; /** * The entity GUID of the highest-numbered version. */ latestVersionEntityId?: pulumi.Input; /** * The highest version number across all versions created so far. */ latestVersionNumber?: pulumi.Input; /** * Set to `true` to create a legacy configuration with no configuration type (null), instead of the `"AgentConfig"` default. Mutually exclusive with `configurationType`. **Cannot be changed after creation.** */ legacyConfig?: pulumi.Input; /** * The type of entities this configuration manages. Valid values: `HOST`, `KUBERNETESCLUSTER`. **Cannot be changed after creation.** */ managedEntityType?: pulumi.Input; /** * The name of the configuration. **Changing this forces resource recreation** — the API does not support renaming a configuration in place. */ name?: pulumi.Input; /** * The operating system this configuration targets. Valid values: `LINUX`, `WINDOWS`. Applicable to `HOST` configurations only — must not be set when `managedEntityType` is `KUBERNETESCLUSTER`. **Cannot be changed after creation.** */ operatingSystem?: pulumi.Input; /** * The organization ID. Auto-fetched from the account when not provided. **Cannot be changed after creation.** */ organizationId?: pulumi.Input; /** * Total number of versions currently in the configuration. */ totalVersions?: pulumi.Input; /** * A list of entity GUIDs for all versions, sorted oldest-first. Use with the `newrelic.FleetConfiguration` data source to retrieve the content of a specific historical version. */ versionEntityIds?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a FleetConfiguration resource. */ export interface FleetConfigurationArgs { /** * The type of agent this configuration is for. Valid values: `NRInfra`, `NRDOT`, `FluentBit`, `NRPrometheusAgent`. **Cannot be changed after creation.** */ agentType: pulumi.Input; /** * The YAML or JSON content for this configuration. Use `file()` to load content from a file. Each change to this field creates a new immutable version on the API; the resource ID remains constant. */ configurationContent: pulumi.Input; /** * The configuration type. Currently only `AgentConfig` is a supported value, and it is the default — a fleet configuration can no longer be created with a null configuration type through this argument. Use `legacyConfig = true` instead to create a legacy configuration. Mutually exclusive with `legacyConfig`. This is an interim restriction pending further product guidance and may change. **Cannot be changed after creation.** */ configurationType?: pulumi.Input; /** * Set to `true` to create a legacy configuration with no configuration type (null), instead of the `"AgentConfig"` default. Mutually exclusive with `configurationType`. **Cannot be changed after creation.** */ legacyConfig?: pulumi.Input; /** * The type of entities this configuration manages. Valid values: `HOST`, `KUBERNETESCLUSTER`. **Cannot be changed after creation.** */ managedEntityType: pulumi.Input; /** * The name of the configuration. **Changing this forces resource recreation** — the API does not support renaming a configuration in place. */ name?: pulumi.Input; /** * The operating system this configuration targets. Valid values: `LINUX`, `WINDOWS`. Applicable to `HOST` configurations only — must not be set when `managedEntityType` is `KUBERNETESCLUSTER`. **Cannot be changed after creation.** */ operatingSystem?: pulumi.Input; /** * The organization ID. Auto-fetched from the account when not provided. **Cannot be changed after creation.** */ organizationId?: pulumi.Input; } //# sourceMappingURL=fleetConfiguration.d.ts.map