@lbrlabs/pulumi-harness
Version:
A Pulumi package for creating and managing Harness resources.
387 lines (386 loc) • 11.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Resource for creating a Harness User Group. Linking SSO providers with User Groups:
*
* The following fields need to be populated for LDAP SSO Providers:
*
* - linkedSsoId
*
* - linkedSsoDisplayName
*
* - ssoGroupId
*
* - ssoGroupName
*
* - linkedSsoType
*
* - ssoLinked
*
* The following fields need to be populated for SAML SSO Providers:
*
* - linkedSsoId
*
* - linkedSsoDisplayName
*
* - ssoGroupName
*
* - ssoGroupId // same as ssoGroupName
*
* - linkedSsoType
*
* - ssoLinked
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@lbrlabs/pulumi-harness";
*
* const ssoTypeSaml = new harness.platform.Usergroup("ssoTypeSaml", {
* externallyManaged: false,
* identifier: "identifier",
* linkedSsoDisplayName: "linked_sso_display_name",
* linkedSsoId: "linked_sso_id",
* linkedSsoType: "SAML",
* notificationConfigs: [
* {
* slackWebhookUrl: "https://google.com",
* type: "SLACK",
* },
* {
* groupEmail: "email@email.com",
* sendEmailToAllUsers: true,
* type: "EMAIL",
* },
* {
* microsoftTeamsWebhookUrl: "https://google.com",
* type: "MSTEAMS",
* },
* {
* pagerDutyKey: "pagerDutyKey",
* type: "PAGERDUTY",
* },
* ],
* orgId: "org_id",
* projectId: "project_id",
* ssoGroupId: "sso_group_name",
* ssoGroupName: "sso_group_name",
* ssoLinked: true,
* users: ["user_id"],
* });
* const ssoTypeLdap = new harness.platform.Usergroup("ssoTypeLdap", {
* externallyManaged: false,
* identifier: "identifier",
* linkedSsoDisplayName: "linked_sso_display_name",
* linkedSsoId: "linked_sso_id",
* linkedSsoType: "LDAP",
* notificationConfigs: [
* {
* slackWebhookUrl: "https://google.com",
* type: "SLACK",
* },
* {
* groupEmail: "email@email.com",
* sendEmailToAllUsers: true,
* type: "EMAIL",
* },
* {
* microsoftTeamsWebhookUrl: "https://google.com",
* type: "MSTEAMS",
* },
* {
* pagerDutyKey: "pagerDutyKey",
* type: "PAGERDUTY",
* },
* ],
* orgId: "org_id",
* projectId: "project_id",
* ssoGroupId: "sso_group_id",
* ssoGroupName: "sso_group_name",
* ssoLinked: true,
* users: ["user_id"],
* });
* // Create user group by adding user emails
* const example = new harness.platform.Usergroup("example", {
* externallyManaged: false,
* identifier: "identifier",
* linkedSsoDisplayName: "linked_sso_display_name",
* linkedSsoId: "linked_sso_id",
* linkedSsoType: "SAML",
* notificationConfigs: [
* {
* slackWebhookUrl: "https://google.com",
* type: "SLACK",
* },
* {
* groupEmail: "email@email.com",
* sendEmailToAllUsers: true,
* type: "EMAIL",
* },
* {
* microsoftTeamsWebhookUrl: "https://google.com",
* type: "MSTEAMS",
* },
* {
* pagerDutyKey: "pagerDutyKey",
* type: "PAGERDUTY",
* },
* ],
* orgId: "org_id",
* projectId: "project_id",
* ssoGroupId: "sso_group_name",
* ssoGroupName: "sso_group_name",
* ssoLinked: true,
* userEmails: ["user@email.com"],
* });
* ```
*
* ## Import
*
* Import account level user group
*
* ```sh
* $ pulumi import harness:platform/usergroup:Usergroup example <usergroup_id>
* ```
*
* Import org level user group
*
* ```sh
* $ pulumi import harness:platform/usergroup:Usergroup example <ord_id>/<usergroup_id>
* ```
*
* Import project level user group
*
* ```sh
* $ pulumi import harness:platform/usergroup:Usergroup example <org_id>/<project_id>/<usergroup_id>
* ```
*/
export declare class Usergroup extends pulumi.CustomResource {
/**
* Get an existing Usergroup 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<pulumi.ID>, state?: UsergroupState, opts?: pulumi.CustomResourceOptions): Usergroup;
/**
* Returns true if the given object is an instance of Usergroup. 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 Usergroup;
/**
* Description of the resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Whether the user group is externally managed.
*/
readonly externallyManaged: pulumi.Output<boolean | undefined>;
/**
* Unique identifier of the resource.
*/
readonly identifier: pulumi.Output<string>;
/**
* Name of the linked SSO.
*/
readonly linkedSsoDisplayName: pulumi.Output<string | undefined>;
/**
* The SSO account ID that the user group is linked to.
*/
readonly linkedSsoId: pulumi.Output<string | undefined>;
/**
* Type of linked SSO.
*/
readonly linkedSsoType: pulumi.Output<string | undefined>;
/**
* Name of the resource.
*/
readonly name: pulumi.Output<string>;
/**
* List of notification settings.
*/
readonly notificationConfigs: pulumi.Output<outputs.platform.UsergroupNotificationConfig[] | undefined>;
/**
* Unique identifier of the organization.
*/
readonly orgId: pulumi.Output<string | undefined>;
/**
* Unique identifier of the project.
*/
readonly projectId: pulumi.Output<string | undefined>;
/**
* Identifier of the userGroup in SSO.
*/
readonly ssoGroupId: pulumi.Output<string | undefined>;
/**
* Name of the SSO userGroup.
*/
readonly ssoGroupName: pulumi.Output<string | undefined>;
/**
* Whether sso is linked or not.
*/
readonly ssoLinked: pulumi.Output<boolean>;
/**
* Tags to associate with the resource.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* List of user emails in the UserGroup. Either provide list of users or list of user emails.
*/
readonly userEmails: pulumi.Output<string[] | undefined>;
/**
* List of users in the UserGroup. Either provide list of users or list of user emails.
*/
readonly users: pulumi.Output<string[] | undefined>;
/**
* Create a Usergroup 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: UsergroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Usergroup resources.
*/
export interface UsergroupState {
/**
* Description of the resource.
*/
description?: pulumi.Input<string>;
/**
* Whether the user group is externally managed.
*/
externallyManaged?: pulumi.Input<boolean>;
/**
* Unique identifier of the resource.
*/
identifier?: pulumi.Input<string>;
/**
* Name of the linked SSO.
*/
linkedSsoDisplayName?: pulumi.Input<string>;
/**
* The SSO account ID that the user group is linked to.
*/
linkedSsoId?: pulumi.Input<string>;
/**
* Type of linked SSO.
*/
linkedSsoType?: pulumi.Input<string>;
/**
* Name of the resource.
*/
name?: pulumi.Input<string>;
/**
* List of notification settings.
*/
notificationConfigs?: pulumi.Input<pulumi.Input<inputs.platform.UsergroupNotificationConfig>[]>;
/**
* Unique identifier of the organization.
*/
orgId?: pulumi.Input<string>;
/**
* Unique identifier of the project.
*/
projectId?: pulumi.Input<string>;
/**
* Identifier of the userGroup in SSO.
*/
ssoGroupId?: pulumi.Input<string>;
/**
* Name of the SSO userGroup.
*/
ssoGroupName?: pulumi.Input<string>;
/**
* Whether sso is linked or not.
*/
ssoLinked?: pulumi.Input<boolean>;
/**
* Tags to associate with the resource.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* List of user emails in the UserGroup. Either provide list of users or list of user emails.
*/
userEmails?: pulumi.Input<pulumi.Input<string>[]>;
/**
* List of users in the UserGroup. Either provide list of users or list of user emails.
*/
users?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a Usergroup resource.
*/
export interface UsergroupArgs {
/**
* Description of the resource.
*/
description?: pulumi.Input<string>;
/**
* Whether the user group is externally managed.
*/
externallyManaged?: pulumi.Input<boolean>;
/**
* Unique identifier of the resource.
*/
identifier: pulumi.Input<string>;
/**
* Name of the linked SSO.
*/
linkedSsoDisplayName?: pulumi.Input<string>;
/**
* The SSO account ID that the user group is linked to.
*/
linkedSsoId?: pulumi.Input<string>;
/**
* Type of linked SSO.
*/
linkedSsoType?: pulumi.Input<string>;
/**
* Name of the resource.
*/
name?: pulumi.Input<string>;
/**
* List of notification settings.
*/
notificationConfigs?: pulumi.Input<pulumi.Input<inputs.platform.UsergroupNotificationConfig>[]>;
/**
* Unique identifier of the organization.
*/
orgId?: pulumi.Input<string>;
/**
* Unique identifier of the project.
*/
projectId?: pulumi.Input<string>;
/**
* Identifier of the userGroup in SSO.
*/
ssoGroupId?: pulumi.Input<string>;
/**
* Name of the SSO userGroup.
*/
ssoGroupName?: pulumi.Input<string>;
/**
* Whether sso is linked or not.
*/
ssoLinked?: pulumi.Input<boolean>;
/**
* Tags to associate with the resource.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* List of user emails in the UserGroup. Either provide list of users or list of user emails.
*/
userEmails?: pulumi.Input<pulumi.Input<string>[]>;
/**
* List of users in the UserGroup. Either provide list of users or list of user emails.
*/
users?: pulumi.Input<pulumi.Input<string>[]>;
}