@pulumi/newrelic 5.79.5 → 5.80.0
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.
- package/getTeamsHierarchyLevels.d.ts +66 -0
- package/getTeamsHierarchyLevels.d.ts.map +1 -0
- package/getTeamsHierarchyLevels.js +89 -0
- package/getTeamsHierarchyLevels.js.map +1 -0
- package/index.d.ts +15 -0
- package/index.d.ts.map +1 -1
- package/index.js +24 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/scorecard.d.ts +251 -0
- package/scorecard.d.ts.map +1 -0
- package/scorecard.js +220 -0
- package/scorecard.js.map +1 -0
- package/scorecardRule.d.ts +292 -0
- package/scorecardRule.d.ts.map +1 -0
- package/scorecardRule.js +243 -0
- package/scorecardRule.js.map +1 -0
- package/team.d.ts +458 -0
- package/team.d.ts.map +1 -0
- package/team.js +356 -0
- package/team.js.map +1 -0
- package/teamsOrganizationSettings.d.ts +207 -0
- package/teamsOrganizationSettings.d.ts.map +1 -0
- package/teamsOrganizationSettings.js +188 -0
- package/teamsOrganizationSettings.js.map +1 -0
- package/types/input.d.ts +102 -0
- package/types/input.d.ts.map +1 -1
- package/types/output.d.ts +112 -0
- package/types/output.d.ts.map +1 -1
package/team.js
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Team = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Use this resource to create, update, and delete [New Relic Teams](https://docs.newrelic.com/docs/service-architecture-intelligence/teams/teams-intro/).
|
|
33
|
+
*
|
|
34
|
+
* Teams group people and associate owned entities (services, dashboards, scorecards, and more) under a single operational identity. They appear across alerts, service maps, and the Teams UI.
|
|
35
|
+
*
|
|
36
|
+
* > **NOTE:** Entity ownership is managed non-authoritatively. Terraform tracks only the entities you declare in the `entities` block and ensures they remain in the collection. Entities added to the collection outside Terraform — through tag-based discovery, relationship propagation, or manual UI additions — are not surfaced as drift and are not removed on apply. To disable entity management entirely and suppress all entity-related plan output, set `entityManagementMode = "unmanaged"`.
|
|
37
|
+
*
|
|
38
|
+
* ## Example Usage
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
43
|
+
*
|
|
44
|
+
* const platform = new newrelic.Team("platform", {
|
|
45
|
+
* name: "Platform Engineering",
|
|
46
|
+
* description: "Owns core platform services and shared infrastructure",
|
|
47
|
+
* aliases: [
|
|
48
|
+
* "platform",
|
|
49
|
+
* "infra",
|
|
50
|
+
* ],
|
|
51
|
+
* tags: [
|
|
52
|
+
* {
|
|
53
|
+
* key: "department",
|
|
54
|
+
* values: ["engineering"],
|
|
55
|
+
* },
|
|
56
|
+
* {
|
|
57
|
+
* key: "tier",
|
|
58
|
+
* values: ["1"],
|
|
59
|
+
* },
|
|
60
|
+
* ],
|
|
61
|
+
* members: [
|
|
62
|
+
* 1234567,
|
|
63
|
+
* 2345678,
|
|
64
|
+
* ],
|
|
65
|
+
* managers: [1234567],
|
|
66
|
+
* resources: [
|
|
67
|
+
* {
|
|
68
|
+
* type: "GITHUB",
|
|
69
|
+
* content: "https://github.com/example-org/platform",
|
|
70
|
+
* title: "GitHub Repository",
|
|
71
|
+
* },
|
|
72
|
+
* {
|
|
73
|
+
* type: "SLACK",
|
|
74
|
+
* content: "https://example.slack.com/channels/platform-eng",
|
|
75
|
+
* title: "Team Slack Channel",
|
|
76
|
+
* },
|
|
77
|
+
* ],
|
|
78
|
+
* entityManagementMode: "managed",
|
|
79
|
+
* entities: [
|
|
80
|
+
* "MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1",
|
|
81
|
+
* engineeringStandards.id,
|
|
82
|
+
* ],
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* See additional examples below.
|
|
87
|
+
*
|
|
88
|
+
* ## Entity Ownership Modes
|
|
89
|
+
*
|
|
90
|
+
* ### `managed` (default)
|
|
91
|
+
*
|
|
92
|
+
* Terraform manages a declared set of entities within the team's ownership collection using a non-authoritative approach. You declare which entity GUIDs Terraform should track; Terraform ensures those entities are present in the collection and surfaces a plan change only when one of them is missing.
|
|
93
|
+
*
|
|
94
|
+
* Entities added to the collection outside Terraform — through tag-based discovery, relationship propagation, or manual UI additions — are not surfaced as drift and are not removed on apply. This means the ownership collection can contain more entities than are declared in `entities`, and Terraform will not interfere with those additional entries.
|
|
95
|
+
*
|
|
96
|
+
* **When to use:** You want Terraform to maintain a specific set of owned entities (for example, a scorecard or a key service) while allowing the platform to populate the rest of the collection through its own discovery mechanisms.
|
|
97
|
+
*
|
|
98
|
+
* **Behaviour:**
|
|
99
|
+
* - Entities declared in the `entities` block are added to the collection on apply.
|
|
100
|
+
* - Entities removed from the `entities` block are removed from the collection on apply.
|
|
101
|
+
* - If a declared entity is removed from the collection outside Terraform, the next plan surfaces a change to re-add it.
|
|
102
|
+
* - Entities present in the collection but not declared in `entities` are silently ignored — no drift, no warnings.
|
|
103
|
+
*
|
|
104
|
+
* ```typescript
|
|
105
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
106
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
107
|
+
*
|
|
108
|
+
* const example = new newrelic.Team("example", {
|
|
109
|
+
* name: "Payments Service",
|
|
110
|
+
* entityManagementMode: "managed",
|
|
111
|
+
* entities: [
|
|
112
|
+
* "MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1",
|
|
113
|
+
* platformStandards.id,
|
|
114
|
+
* ],
|
|
115
|
+
* });
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* ### `unmanaged`
|
|
119
|
+
*
|
|
120
|
+
* Terraform does not manage the team's entity ownership collection at all. The collection is left entirely to the New Relic platform — tag-based discovery, relationship propagation, or manual management through the Teams UI.
|
|
121
|
+
*
|
|
122
|
+
* **When to use:** Entity ownership for this team is governed entirely outside Terraform (for example, by tagging conventions). You want to manage the team resource itself — name, aliases, members — without Terraform interfering with what the platform assigns to the collection.
|
|
123
|
+
*
|
|
124
|
+
* **Behaviour:**
|
|
125
|
+
* - The `entities` attribute cannot be set in config. The provider returns a plan-time error if it is.
|
|
126
|
+
* - The `entities` attribute is always empty in state.
|
|
127
|
+
* - No drift is surfaced for the ownership collection, regardless of what is added or removed externally.
|
|
128
|
+
*
|
|
129
|
+
* ```typescript
|
|
130
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
131
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
132
|
+
*
|
|
133
|
+
* const example = new newrelic.Team("example", {
|
|
134
|
+
* name: "Payments Service",
|
|
135
|
+
* entityManagementMode: "unmanaged",
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* ### Switching Between Modes
|
|
140
|
+
*
|
|
141
|
+
* Switching from `managed` to `unmanaged` clears `entities` from state on the next apply. The ownership collection itself is **not modified** — entities remain in the collection and are governed entirely outside Terraform from that point.
|
|
142
|
+
*
|
|
143
|
+
* Switching from `unmanaged` back to `managed` allows entity tracking to resume. Entities already in the collection are unaffected; you can begin declaring any of them in the `entities` block to bring them under Terraform management.
|
|
144
|
+
*
|
|
145
|
+
* ## Hierarchy Levels
|
|
146
|
+
*
|
|
147
|
+
* When teams are linked via `parentId`, the platform automatically assigns each team a `hierarchyLevelId` based on its depth in the hierarchy. This value becomes available on the **next** plan after `parentId` is first set.
|
|
148
|
+
*
|
|
149
|
+
* You can reference `hierarchyLevelId` directly in `newrelic.TeamsOrganizationSettings` to rename the level, without requiring a separate NerdGraph query or data source lookup:
|
|
150
|
+
*
|
|
151
|
+
* ```typescript
|
|
152
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
153
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
154
|
+
*
|
|
155
|
+
* const division = new newrelic.Team("division", {name: "Engineering Division"});
|
|
156
|
+
* const squad = new newrelic.Team("squad", {
|
|
157
|
+
* name: "Backend Squad",
|
|
158
|
+
* parentId: division.id,
|
|
159
|
+
* });
|
|
160
|
+
* const org = new newrelic.TeamsOrganizationSettings("org", {hierarchyLevels: [
|
|
161
|
+
* {
|
|
162
|
+
* id: division.hierarchyLevelId,
|
|
163
|
+
* name: "Division",
|
|
164
|
+
* },
|
|
165
|
+
* {
|
|
166
|
+
* id: squad.hierarchyLevelId,
|
|
167
|
+
* name: "Squad",
|
|
168
|
+
* },
|
|
169
|
+
* ]});
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* Alternatively, use the `newrelic.getTeamsHierarchyLevels` data source to reference levels by index:
|
|
173
|
+
*
|
|
174
|
+
* ```typescript
|
|
175
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
176
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
177
|
+
*
|
|
178
|
+
* const all = newrelic.getTeamsHierarchyLevels({});
|
|
179
|
+
* const org = new newrelic.TeamsOrganizationSettings("org", {hierarchyLevels: [{
|
|
180
|
+
* id: all.then(all => all.levels?.[0]?.id),
|
|
181
|
+
* name: "Division",
|
|
182
|
+
* }]});
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* ## Additional Examples
|
|
186
|
+
*
|
|
187
|
+
* ### Minimal team
|
|
188
|
+
*
|
|
189
|
+
* ```typescript
|
|
190
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
191
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
192
|
+
*
|
|
193
|
+
* const backend = new newrelic.Team("backend", {name: "Backend Engineering"});
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* ### Team with a parent (hierarchy)
|
|
197
|
+
*
|
|
198
|
+
* ```typescript
|
|
199
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
200
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
201
|
+
*
|
|
202
|
+
* const engineering = new newrelic.Team("engineering", {
|
|
203
|
+
* name: "Engineering",
|
|
204
|
+
* description: "Top-level engineering division",
|
|
205
|
+
* });
|
|
206
|
+
* const backend = new newrelic.Team("backend", {
|
|
207
|
+
* name: "Backend",
|
|
208
|
+
* parentId: engineering.id,
|
|
209
|
+
* });
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* ### Team owning a scorecard
|
|
213
|
+
*
|
|
214
|
+
* ```typescript
|
|
215
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
216
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
217
|
+
*
|
|
218
|
+
* const standards = new newrelic.Scorecard("standards", {
|
|
219
|
+
* name: "Engineering Standards",
|
|
220
|
+
* ruleIds: [alertCoverage.id],
|
|
221
|
+
* });
|
|
222
|
+
* const platform = new newrelic.Team("platform", {
|
|
223
|
+
* name: "Platform",
|
|
224
|
+
* entityManagementMode: "managed",
|
|
225
|
+
* entities: [standards.id],
|
|
226
|
+
* });
|
|
227
|
+
* ```
|
|
228
|
+
*
|
|
229
|
+
* ### Team with externally managed entity ownership
|
|
230
|
+
*
|
|
231
|
+
* Use `unmanaged` mode when entity ownership is managed outside Terraform — through tag-based discovery, relationship rules, or the Teams UI — and you do not want Terraform to produce any drift for the ownership collection.
|
|
232
|
+
*
|
|
233
|
+
* ```typescript
|
|
234
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
235
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
236
|
+
*
|
|
237
|
+
* const payments = new newrelic.Team("payments", {
|
|
238
|
+
* name: "Payments",
|
|
239
|
+
* aliases: ["payments-service"],
|
|
240
|
+
* entityManagementMode: "unmanaged",
|
|
241
|
+
* });
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* ### Team with members, managers, and supplemental resources
|
|
245
|
+
*
|
|
246
|
+
* ```typescript
|
|
247
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
248
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
249
|
+
*
|
|
250
|
+
* const platform = new newrelic.Team("platform", {
|
|
251
|
+
* name: "Platform Engineering",
|
|
252
|
+
* description: "Owns shared infrastructure and developer tooling",
|
|
253
|
+
* members: [
|
|
254
|
+
* 1234567,
|
|
255
|
+
* 2345678,
|
|
256
|
+
* 3456789,
|
|
257
|
+
* ],
|
|
258
|
+
* managers: [1234567],
|
|
259
|
+
* resources: [
|
|
260
|
+
* {
|
|
261
|
+
* type: "GITHUB",
|
|
262
|
+
* content: "https://github.com/example-org/platform",
|
|
263
|
+
* title: "Source Repository",
|
|
264
|
+
* },
|
|
265
|
+
* {
|
|
266
|
+
* type: "SLACK",
|
|
267
|
+
* content: "https://example.slack.com/channels/platform-eng",
|
|
268
|
+
* title: "Team Channel",
|
|
269
|
+
* },
|
|
270
|
+
* {
|
|
271
|
+
* type: "PAGERDUTY",
|
|
272
|
+
* content: "https://example.pagerduty.com/teams/platform",
|
|
273
|
+
* title: "On-Call Schedule",
|
|
274
|
+
* },
|
|
275
|
+
* ],
|
|
276
|
+
* });
|
|
277
|
+
* ```
|
|
278
|
+
*
|
|
279
|
+
* ## Import
|
|
280
|
+
*
|
|
281
|
+
* Teams can be imported using the entity GUID:
|
|
282
|
+
*
|
|
283
|
+
* ```sh
|
|
284
|
+
* $ pulumi import newrelic:index/team:Team example <guid>
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* To find a team's GUID after creating it, use `terraform state show` or the following NerdGraph query:
|
|
288
|
+
*/
|
|
289
|
+
class Team extends pulumi.CustomResource {
|
|
290
|
+
/**
|
|
291
|
+
* Get an existing Team resource's state with the given name, ID, and optional extra
|
|
292
|
+
* properties used to qualify the lookup.
|
|
293
|
+
*
|
|
294
|
+
* @param name The _unique_ name of the resulting resource.
|
|
295
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
296
|
+
* @param state Any extra arguments used during the lookup.
|
|
297
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
298
|
+
*/
|
|
299
|
+
static get(name, id, state, opts) {
|
|
300
|
+
return new Team(name, state, { ...opts, id: id });
|
|
301
|
+
}
|
|
302
|
+
/** @internal */
|
|
303
|
+
static __pulumiType = 'newrelic:index/team:Team';
|
|
304
|
+
/**
|
|
305
|
+
* Returns true if the given object is an instance of Team. This is designed to work even
|
|
306
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
307
|
+
*/
|
|
308
|
+
static isInstance(obj) {
|
|
309
|
+
if (obj === undefined || obj === null) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
return obj['__pulumiType'] === Team.__pulumiType;
|
|
313
|
+
}
|
|
314
|
+
constructor(name, argsOrState, opts) {
|
|
315
|
+
let resourceInputs = {};
|
|
316
|
+
opts = opts || {};
|
|
317
|
+
if (opts.id) {
|
|
318
|
+
const state = argsOrState;
|
|
319
|
+
resourceInputs["aliases"] = state?.aliases;
|
|
320
|
+
resourceInputs["description"] = state?.description;
|
|
321
|
+
resourceInputs["entities"] = state?.entities;
|
|
322
|
+
resourceInputs["entityManagementMode"] = state?.entityManagementMode;
|
|
323
|
+
resourceInputs["hierarchyLevelId"] = state?.hierarchyLevelId;
|
|
324
|
+
resourceInputs["managers"] = state?.managers;
|
|
325
|
+
resourceInputs["members"] = state?.members;
|
|
326
|
+
resourceInputs["membershipCollectionId"] = state?.membershipCollectionId;
|
|
327
|
+
resourceInputs["name"] = state?.name;
|
|
328
|
+
resourceInputs["organizationId"] = state?.organizationId;
|
|
329
|
+
resourceInputs["ownershipCollectionId"] = state?.ownershipCollectionId;
|
|
330
|
+
resourceInputs["parentId"] = state?.parentId;
|
|
331
|
+
resourceInputs["resources"] = state?.resources;
|
|
332
|
+
resourceInputs["tags"] = state?.tags;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
const args = argsOrState;
|
|
336
|
+
resourceInputs["aliases"] = args?.aliases;
|
|
337
|
+
resourceInputs["description"] = args?.description;
|
|
338
|
+
resourceInputs["entities"] = args?.entities;
|
|
339
|
+
resourceInputs["entityManagementMode"] = args?.entityManagementMode;
|
|
340
|
+
resourceInputs["managers"] = args?.managers;
|
|
341
|
+
resourceInputs["members"] = args?.members;
|
|
342
|
+
resourceInputs["name"] = args?.name;
|
|
343
|
+
resourceInputs["parentId"] = args?.parentId;
|
|
344
|
+
resourceInputs["resources"] = args?.resources;
|
|
345
|
+
resourceInputs["tags"] = args?.tags;
|
|
346
|
+
resourceInputs["hierarchyLevelId"] = undefined /*out*/;
|
|
347
|
+
resourceInputs["membershipCollectionId"] = undefined /*out*/;
|
|
348
|
+
resourceInputs["organizationId"] = undefined /*out*/;
|
|
349
|
+
resourceInputs["ownershipCollectionId"] = undefined /*out*/;
|
|
350
|
+
}
|
|
351
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
352
|
+
super(Team.__pulumiType, name, resourceInputs, opts);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
exports.Team = Team;
|
|
356
|
+
//# sourceMappingURL=team.js.map
|
package/team.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.js","sourceRoot":"","sources":["../team.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiQG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAC3C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiB,EAAE,IAAmC;QAC/G,OAAO,IAAI,IAAI,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,0BAA0B,CAAC;IAEjE;;;OAGG;IACI,MAAM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
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Use this resource to manage the organisation-level settings that control how New Relic Teams works across your organisation:
|
|
6
|
+
*
|
|
7
|
+
* - **Entity discovery**: Automatically assigns entities to teams based on tag values.
|
|
8
|
+
* - **Hierarchy levels**: Define and rename the ordered tiers shown in the Teams UI.
|
|
9
|
+
* - **Sync group rules**: Automatically creates teams from IdP groups that match name patterns.
|
|
10
|
+
*
|
|
11
|
+
* > **NOTE:** There is exactly one `TEAMS_ORGANIZATION_SETTINGS` entity per New Relic organisation. This resource is **import-optional** — if you apply it without importing first, the provider automatically locates the singleton, applies your configuration, and emits a warning stating that the existing settings have been overridden. `pulumi import` is supported for an explicit workflow.
|
|
12
|
+
*
|
|
13
|
+
* ## Example Usage
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
18
|
+
*
|
|
19
|
+
* const all = newrelic.getTeamsHierarchyLevels({});
|
|
20
|
+
* const org = new newrelic.TeamsOrganizationSettings("org", {
|
|
21
|
+
* discoveryEnabled: true,
|
|
22
|
+
* discoveryTagKeys: [
|
|
23
|
+
* "team",
|
|
24
|
+
* "teamId",
|
|
25
|
+
* ],
|
|
26
|
+
* hierarchyLevels: [
|
|
27
|
+
* {
|
|
28
|
+
* id: all.then(all => all.levels?.[0]?.id),
|
|
29
|
+
* name: "Division",
|
|
30
|
+
* },
|
|
31
|
+
* {
|
|
32
|
+
* id: all.then(all => all.levels?.[1]?.id),
|
|
33
|
+
* name: "Squad",
|
|
34
|
+
* },
|
|
35
|
+
* ],
|
|
36
|
+
* syncGroupsEnabled: true,
|
|
37
|
+
* syncGroupRules: {
|
|
38
|
+
* conditions: [
|
|
39
|
+
* {
|
|
40
|
+
* type: "CONTAINS",
|
|
41
|
+
* value: "-engineering-",
|
|
42
|
+
* },
|
|
43
|
+
* {
|
|
44
|
+
* type: "ENDS_WITH",
|
|
45
|
+
* value: "-prod",
|
|
46
|
+
* },
|
|
47
|
+
* ],
|
|
48
|
+
* },
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* See additional examples below.
|
|
53
|
+
*
|
|
54
|
+
* ## Hierarchy Level IDs
|
|
55
|
+
*
|
|
56
|
+
* Use the `newrelic.getTeamsHierarchyLevels` data source to discover level GUIDs programmatically:
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
60
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
61
|
+
*
|
|
62
|
+
* const all = newrelic.getTeamsHierarchyLevels({});
|
|
63
|
+
* export const divisionLevelId = all.then(all => all.levels?.[0]?.id);
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* Alternatively, each `newrelic.Team` resource exports a `hierarchyLevelId` attribute that reflects the level the team is currently assigned to. You can use this to reference a specific level without the data source:
|
|
67
|
+
*
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
70
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
71
|
+
*
|
|
72
|
+
* const division = new newrelic.Team("division", {name: "Engineering Division"});
|
|
73
|
+
* const org = new newrelic.TeamsOrganizationSettings("org", {hierarchyLevels: [{
|
|
74
|
+
* id: division.hierarchyLevelId,
|
|
75
|
+
* name: "Division",
|
|
76
|
+
* }]});
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* ## Additional Examples
|
|
80
|
+
*
|
|
81
|
+
* ### Discovery only — no hierarchy configuration
|
|
82
|
+
*
|
|
83
|
+
* ```typescript
|
|
84
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
85
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
86
|
+
*
|
|
87
|
+
* const org = new newrelic.TeamsOrganizationSettings("org", {
|
|
88
|
+
* discoveryEnabled: true,
|
|
89
|
+
* discoveryTagKeys: ["team"],
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* ### Disable all discovery
|
|
94
|
+
*
|
|
95
|
+
* ```typescript
|
|
96
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
97
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
98
|
+
*
|
|
99
|
+
* const org = new newrelic.TeamsOrganizationSettings("org", {discoveryEnabled: false});
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* ## Import
|
|
103
|
+
*
|
|
104
|
+
* The organisation settings singleton must be imported using its entity GUID. Discover the GUID with NerdGraph:
|
|
105
|
+
*
|
|
106
|
+
* Then import:
|
|
107
|
+
*
|
|
108
|
+
* ```sh
|
|
109
|
+
* $ pulumi import newrelic:index/teamsOrganizationSettings:TeamsOrganizationSettings org <guid>
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export declare class TeamsOrganizationSettings extends pulumi.CustomResource {
|
|
113
|
+
/**
|
|
114
|
+
* Get an existing TeamsOrganizationSettings resource's state with the given name, ID, and optional extra
|
|
115
|
+
* properties used to qualify the lookup.
|
|
116
|
+
*
|
|
117
|
+
* @param name The _unique_ name of the resulting resource.
|
|
118
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
119
|
+
* @param state Any extra arguments used during the lookup.
|
|
120
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
121
|
+
*/
|
|
122
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TeamsOrganizationSettingsState, opts?: pulumi.CustomResourceOptions): TeamsOrganizationSettings;
|
|
123
|
+
/**
|
|
124
|
+
* Returns true if the given object is an instance of TeamsOrganizationSettings. This is designed to work even
|
|
125
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
126
|
+
*/
|
|
127
|
+
static isInstance(obj: any): obj is TeamsOrganizationSettings;
|
|
128
|
+
/**
|
|
129
|
+
* Whether tag-based entity discovery is enabled. When true, entities with a matching tag are automatically assigned to teams.
|
|
130
|
+
*/
|
|
131
|
+
readonly discoveryEnabled: pulumi.Output<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* Tag keys used for entity discovery (e.g. ["team"]). Entities with these tags are auto-assigned to the team whose name or alias matches the tag value. Must contain at least one key when declared.
|
|
134
|
+
*/
|
|
135
|
+
readonly discoveryTagKeys: pulumi.Output<string[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Set of organisation hierarchy levels to manage. Order is not significant — the platform controls hierarchy depth ordering automatically. Use the newrelic.getTeamsHierarchyLevels data source to obtain level GUIDs.
|
|
138
|
+
*/
|
|
139
|
+
readonly hierarchyLevels: pulumi.Output<outputs.TeamsOrganizationSettingsHierarchyLevel[]>;
|
|
140
|
+
/**
|
|
141
|
+
* Rules that control which IdP groups automatically create teams. Each rule specifies one or more match conditions. Omitting this block preserves existing rules; set to [] to remove all rules. The NGEP API currently allows at most one rule.
|
|
142
|
+
*/
|
|
143
|
+
readonly syncGroupRules: pulumi.Output<outputs.TeamsOrganizationSettingsSyncGroupRules>;
|
|
144
|
+
/**
|
|
145
|
+
* Whether automatic team creation from IdP groups is enabled.
|
|
146
|
+
*/
|
|
147
|
+
readonly syncGroupsEnabled: pulumi.Output<boolean>;
|
|
148
|
+
/**
|
|
149
|
+
* Create a TeamsOrganizationSettings resource with the given unique name, arguments, and options.
|
|
150
|
+
*
|
|
151
|
+
* @param name The _unique_ name of the resource.
|
|
152
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
153
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
154
|
+
*/
|
|
155
|
+
constructor(name: string, args?: TeamsOrganizationSettingsArgs, opts?: pulumi.CustomResourceOptions);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Input properties used for looking up and filtering TeamsOrganizationSettings resources.
|
|
159
|
+
*/
|
|
160
|
+
export interface TeamsOrganizationSettingsState {
|
|
161
|
+
/**
|
|
162
|
+
* Whether tag-based entity discovery is enabled. When true, entities with a matching tag are automatically assigned to teams.
|
|
163
|
+
*/
|
|
164
|
+
discoveryEnabled?: pulumi.Input<boolean | undefined>;
|
|
165
|
+
/**
|
|
166
|
+
* Tag keys used for entity discovery (e.g. ["team"]). Entities with these tags are auto-assigned to the team whose name or alias matches the tag value. Must contain at least one key when declared.
|
|
167
|
+
*/
|
|
168
|
+
discoveryTagKeys?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
169
|
+
/**
|
|
170
|
+
* Set of organisation hierarchy levels to manage. Order is not significant — the platform controls hierarchy depth ordering automatically. Use the newrelic.getTeamsHierarchyLevels data source to obtain level GUIDs.
|
|
171
|
+
*/
|
|
172
|
+
hierarchyLevels?: pulumi.Input<pulumi.Input<inputs.TeamsOrganizationSettingsHierarchyLevel>[] | undefined>;
|
|
173
|
+
/**
|
|
174
|
+
* Rules that control which IdP groups automatically create teams. Each rule specifies one or more match conditions. Omitting this block preserves existing rules; set to [] to remove all rules. The NGEP API currently allows at most one rule.
|
|
175
|
+
*/
|
|
176
|
+
syncGroupRules?: pulumi.Input<inputs.TeamsOrganizationSettingsSyncGroupRules | undefined>;
|
|
177
|
+
/**
|
|
178
|
+
* Whether automatic team creation from IdP groups is enabled.
|
|
179
|
+
*/
|
|
180
|
+
syncGroupsEnabled?: pulumi.Input<boolean | undefined>;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The set of arguments for constructing a TeamsOrganizationSettings resource.
|
|
184
|
+
*/
|
|
185
|
+
export interface TeamsOrganizationSettingsArgs {
|
|
186
|
+
/**
|
|
187
|
+
* Whether tag-based entity discovery is enabled. When true, entities with a matching tag are automatically assigned to teams.
|
|
188
|
+
*/
|
|
189
|
+
discoveryEnabled?: pulumi.Input<boolean | undefined>;
|
|
190
|
+
/**
|
|
191
|
+
* Tag keys used for entity discovery (e.g. ["team"]). Entities with these tags are auto-assigned to the team whose name or alias matches the tag value. Must contain at least one key when declared.
|
|
192
|
+
*/
|
|
193
|
+
discoveryTagKeys?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
194
|
+
/**
|
|
195
|
+
* Set of organisation hierarchy levels to manage. Order is not significant — the platform controls hierarchy depth ordering automatically. Use the newrelic.getTeamsHierarchyLevels data source to obtain level GUIDs.
|
|
196
|
+
*/
|
|
197
|
+
hierarchyLevels?: pulumi.Input<pulumi.Input<inputs.TeamsOrganizationSettingsHierarchyLevel>[] | undefined>;
|
|
198
|
+
/**
|
|
199
|
+
* Rules that control which IdP groups automatically create teams. Each rule specifies one or more match conditions. Omitting this block preserves existing rules; set to [] to remove all rules. The NGEP API currently allows at most one rule.
|
|
200
|
+
*/
|
|
201
|
+
syncGroupRules?: pulumi.Input<inputs.TeamsOrganizationSettingsSyncGroupRules | undefined>;
|
|
202
|
+
/**
|
|
203
|
+
* Whether automatic team creation from IdP groups is enabled.
|
|
204
|
+
*/
|
|
205
|
+
syncGroupsEnabled?: pulumi.Input<boolean | undefined>;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=teamsOrganizationSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teamsOrganizationSettings.d.ts","sourceRoot":"","sources":["../teamsOrganizationSettings.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2GG;AACH,qBAAa,yBAA0B,SAAQ,MAAM,CAAC,cAAc;IAChE;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAA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