import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Use this resource to manage the organisation-level settings that control how New Relic Teams works across your organisation: * * - **Entity discovery**: Automatically assigns entities to teams based on tag values. * - **Hierarchy levels**: Define and rename the ordered tiers shown in the Teams UI. * - **Sync group rules**: Automatically creates teams from IdP groups that match name patterns. * * > **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. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const all = newrelic.getTeamsHierarchyLevels({}); * const org = new newrelic.TeamsOrganizationSettings("org", { * discoveryEnabled: true, * discoveryTagKeys: [ * "team", * "teamId", * ], * hierarchyLevels: [ * { * id: all.then(all => all.levels?.[0]?.id), * name: "Division", * }, * { * id: all.then(all => all.levels?.[1]?.id), * name: "Squad", * }, * ], * syncGroupsEnabled: true, * syncGroupRules: { * conditions: [ * { * type: "CONTAINS", * value: "-engineering-", * }, * { * type: "ENDS_WITH", * value: "-prod", * }, * ], * }, * }); * ``` * * See additional examples below. * * ## Hierarchy Level IDs * * Use the `newrelic.getTeamsHierarchyLevels` data source to discover level GUIDs programmatically: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const all = newrelic.getTeamsHierarchyLevels({}); * export const divisionLevelId = all.then(all => all.levels?.[0]?.id); * ``` * * 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: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const division = new newrelic.Team("division", {name: "Engineering Division"}); * const org = new newrelic.TeamsOrganizationSettings("org", {hierarchyLevels: [{ * id: division.hierarchyLevelId, * name: "Division", * }]}); * ``` * * ## Additional Examples * * ### Discovery only — no hierarchy configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const org = new newrelic.TeamsOrganizationSettings("org", { * discoveryEnabled: true, * discoveryTagKeys: ["team"], * }); * ``` * * ### Disable all discovery * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const org = new newrelic.TeamsOrganizationSettings("org", {discoveryEnabled: false}); * ``` * * ## Import * * The organisation settings singleton must be imported using its entity GUID. Discover the GUID with NerdGraph: * * Then import: * * ```sh * $ pulumi import newrelic:index/teamsOrganizationSettings:TeamsOrganizationSettings org * ``` */ export declare class TeamsOrganizationSettings extends pulumi.CustomResource { /** * Get an existing TeamsOrganizationSettings 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?: TeamsOrganizationSettingsState, opts?: pulumi.CustomResourceOptions): TeamsOrganizationSettings; /** * Returns true if the given object is an instance of TeamsOrganizationSettings. 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 TeamsOrganizationSettings; /** * Whether tag-based entity discovery is enabled. When true, entities with a matching tag are automatically assigned to teams. */ readonly discoveryEnabled: pulumi.Output; /** * 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. */ readonly discoveryTagKeys: pulumi.Output; /** * 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. */ readonly hierarchyLevels: pulumi.Output; /** * 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. */ readonly syncGroupRules: pulumi.Output; /** * Whether automatic team creation from IdP groups is enabled. */ readonly syncGroupsEnabled: pulumi.Output; /** * Create a TeamsOrganizationSettings 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?: TeamsOrganizationSettingsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamsOrganizationSettings resources. */ export interface TeamsOrganizationSettingsState { /** * Whether tag-based entity discovery is enabled. When true, entities with a matching tag are automatically assigned to teams. */ discoveryEnabled?: pulumi.Input; /** * 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. */ discoveryTagKeys?: pulumi.Input[] | undefined>; /** * 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. */ hierarchyLevels?: pulumi.Input[] | undefined>; /** * 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. */ syncGroupRules?: pulumi.Input; /** * Whether automatic team creation from IdP groups is enabled. */ syncGroupsEnabled?: pulumi.Input; } /** * The set of arguments for constructing a TeamsOrganizationSettings resource. */ export interface TeamsOrganizationSettingsArgs { /** * Whether tag-based entity discovery is enabled. When true, entities with a matching tag are automatically assigned to teams. */ discoveryEnabled?: pulumi.Input; /** * 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. */ discoveryTagKeys?: pulumi.Input[] | undefined>; /** * 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. */ hierarchyLevels?: pulumi.Input[] | undefined>; /** * 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. */ syncGroupRules?: pulumi.Input; /** * Whether automatic team creation from IdP groups is enabled. */ syncGroupsEnabled?: pulumi.Input; } //# sourceMappingURL=teamsOrganizationSettings.d.ts.map