@pulumi/newrelic 5.72.1 → 5.72.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,9 +31,9 @@ const utilities = __importStar(require("./utilities"));
31
31
  /**
32
32
  * Use this resource to create and manage New Relic fleet deployments.
33
33
  *
34
- * A fleet deployment defines the agent versions and optional configuration versions to roll out to a fleet. Each deployment belongs to a fleet and contains one or more `agent` blocks describing which agent type and version to deploy, and optionally which configuration version (from `newrelic.FleetConfiguration`) to apply.
34
+ * A fleet deployment defines the agent versions and configuration versions to roll out to a fleet. Each deployment belongs to a fleet and may contain zero or more `agent` blocks describing which agent type and version to deploy and which configuration version (from `newrelic.FleetConfiguration`) to apply.
35
35
  *
36
- * > **Note:** Deployments can only be updated while in the `CREATED` phase. Once the fleet backend begins executing the deployment (phase advances to `IN_PROGRESS`, `FAILED`, or `COMPLETED`), any attempt to change `name`, `description`, `agent`, or `tags` will be **blocked at plan time** with an error. Run `terraform destroy` to remove the deployment from state and then re-create it with the desired configuration. If `terraform destroy` itself fails because the deployment is actively executing, the resource will be removed from Terraform state with a warning once the deployment reaches a terminal phase (`COMPLETED` or `FAILED`) you can clean it up manually in the New Relic UI.
36
+ * > **Note: Phase-gate immutability.** Deployments can only be modified while in the `CREATED` phase. Once the fleet backend begins executing the deployment (phase advances to `IN_PROGRESS`, `FAILED`, or `COMPLETED`), any attempt to change `name`, `description`, `agent`, or `tags` is **blocked at plan time** with a clear error. The recommended recovery path is `terraform state rm <resource_address>` (or a `removed` block) to drop the executed deployment from Terraform state, then re-declare a fresh deployment with the desired configuration. `terraform destroy` works only if you have no pending changes to the deployment in your HCLotherwise the same plan-time gate fires during the destroy plan.
37
37
  *
38
38
  * ## Example Usage
39
39
  *
@@ -43,32 +43,14 @@ const utilities = __importStar(require("./utilities"));
43
43
  * import * as pulumi from "@pulumi/pulumi";
44
44
  * import * as newrelic from "@pulumi/newrelic";
45
45
  *
46
- * const infra = new newrelic.FleetDeployment("infra", {
47
- * fleetId: prod.id,
48
- * name: "Production Infra Deployment",
49
- * description: "Deploys NRInfra v1.58.0 to the production fleet",
50
- * agents: [{
51
- * agentType: "NRInfra",
52
- * version: "1.58.0",
53
- * }],
54
- * });
55
- * ```
56
- *
57
- * ### Deployment Linked to a Configuration Version
58
- *
59
- * ```typescript
60
- * import * as pulumi from "@pulumi/pulumi";
61
- * import * as newrelic from "@pulumi/newrelic";
62
- *
63
46
  * const infraCfg = new newrelic.FleetConfiguration("infra_cfg", {
64
47
  * name: "Production Infra Config",
65
48
  * agentType: "NRInfra",
66
49
  * managedEntityType: "HOST",
67
- * versions: [{
68
- * configurationContent: `log:
50
+ * operatingSystem: "LINUX",
51
+ * configurationContent: `log:
69
52
  * level: info
70
53
  * `,
71
- * }],
72
54
  * });
73
55
  * const infra = new newrelic.FleetDeployment("infra", {
74
56
  * fleetId: prod.id,
@@ -84,6 +66,8 @@ const utilities = __importStar(require("./utilities"));
84
66
  *
85
67
  * ### Multiple Agents
86
68
  *
69
+ * Each `agentType` may appear at most once per deployment.
70
+ *
87
71
  * ```typescript
88
72
  * import * as pulumi from "@pulumi/pulumi";
89
73
  * import * as newrelic from "@pulumi/newrelic";
@@ -100,11 +84,47 @@ const utilities = __importStar(require("./utilities"));
100
84
  * {
101
85
  * agentType: "FluentBit",
102
86
  * version: "3.2.0",
87
+ * configurationVersionId: fbCfg.latestVersionEntityId,
103
88
  * },
104
89
  * ],
105
90
  * });
106
91
  * ```
107
92
  *
93
+ * ### Zero-Agent Deployment
94
+ *
95
+ * A deployment can be created or updated with zero `agent` blocks — for example, to drain all agent assignments from an existing deployment, or to seed a deployment record that will have agents added later (while still in `CREATED` phase).
96
+ *
97
+ * ```typescript
98
+ * import * as pulumi from "@pulumi/pulumi";
99
+ * import * as newrelic from "@pulumi/newrelic";
100
+ *
101
+ * const drained = new newrelic.FleetDeployment("drained", {
102
+ * fleetId: prod.id,
103
+ * name: "Drained deployment",
104
+ * });
105
+ * ```
106
+ *
107
+ * ### Pinning to a Specific Configuration Version
108
+ *
109
+ * By default, referencing `newrelic_fleet_configuration.<name>.latest_version_entity_id` ties the deployment to whichever version is current at plan time. Updating the configuration's `configurationContent` will change `latestVersionEntityId`, which in turn proposes an update to any deployment referencing it. If the deployment has already left `CREATED`, that update will be **blocked by the phase-gate** — see the note above.
110
+ *
111
+ * For long-lived deployments that should remain stable, pin to a specific historical version instead:
112
+ *
113
+ * ```typescript
114
+ * import * as pulumi from "@pulumi/pulumi";
115
+ * import * as newrelic from "@pulumi/newrelic";
116
+ *
117
+ * const pinned = new newrelic.FleetDeployment("pinned", {
118
+ * fleetId: prod.id,
119
+ * name: "Stable v1 rollout",
120
+ * agents: [{
121
+ * agentType: "NRInfra",
122
+ * version: "1.58.0",
123
+ * configurationVersionId: infraCfg.versionEntityIds[0],
124
+ * }],
125
+ * });
126
+ * ```
127
+ *
108
128
  * ### With Tags
109
129
  *
110
130
  * ```typescript
@@ -117,6 +137,7 @@ const utilities = __importStar(require("./utilities"));
117
137
  * agents: [{
118
138
  * agentType: "NRInfra",
119
139
  * version: "1.58.0",
140
+ * configurationVersionId: infraCfg.latestVersionEntityId,
120
141
  * }],
121
142
  * tags: [
122
143
  * "environment:production",
@@ -1 +1 @@
1
- {"version":3,"file":"fleetDeployment.js","sourceRoot":"","sources":["../fleetDeployment.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AACH,MAAa,eAAgB,SAAQ,MAAM,CAAC,cAAc;IACtD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA4B,EAAE,IAAmC;QAC1H,OAAO,I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aAC1D;YACD,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC;YACxC,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC;YAClD,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,gBAAgB,CAAC,GAAG,IAAI,EAAE,cAAc,CAAC;YACxD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACnD,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC/C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,eAAe,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACpE,CAAC;;AAlGL,0CAmGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/newrelic",
3
- "version": "5.72.1",
3
+ "version": "5.72.2",
4
4
  "description": "A Pulumi package for creating and managing New Relic resources.",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -23,6 +23,6 @@
23
23
  "pulumi": {
24
24
  "resource": true,
25
25
  "name": "newrelic",
26
- "version": "5.72.1"
26
+ "version": "5.72.2"
27
27
  }
28
28
  }
package/types/input.d.ts CHANGED
@@ -405,29 +405,13 @@ export interface FederatedLogsSetupStorageCloudProviderConfiguration {
405
405
  */
406
406
  region: pulumi.Input<string>;
407
407
  }
408
- export interface FleetConfigurationVersion {
409
- /**
410
- * The YAML or JSON content for this version. Must be unique across all `version` blocks in the resource. Use `file()` to load content from a file: `file("${path.module}/config.yaml")`.
411
- *
412
- * The following attributes are exported from each `version` block:
413
- */
414
- configurationContent: pulumi.Input<string>;
415
- /**
416
- * The entity GUID of this version.
417
- */
418
- versionEntityId?: pulumi.Input<string | undefined>;
419
- /**
420
- * The version number assigned by the API (1, 2, 3, …).
421
- */
422
- versionNumber?: pulumi.Input<number | undefined>;
423
- }
424
408
  export interface FleetDeploymentAgent {
425
409
  /**
426
410
  * The agent type. Valid values: `NRInfra`, `NRDOT`, `FluentBit`, `NRPrometheusAgent`.
427
411
  */
428
412
  agentType: pulumi.Input<string>;
429
413
  /**
430
- * A configuration version entity GUID (from `newrelic.FleetConfiguration`) to associate with this agent in the deployment.
414
+ * The entity GUID of the configuration version (from `newrelic.FleetConfiguration`) to associate with this agent. Reference `latestVersionEntityId` to follow the current version, or `version_entity_ids[N]` to pin to a specific historical version.
431
415
  */
432
416
  configurationVersionId: pulumi.Input<string>;
433
417
  /**