@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
127 lines (126 loc) • 5.16 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages the entire set of permissions for a service account. Permissions that aren't specified when applying this resource will be removed.
*
* **Note:** This resource is available from Grafana 9.2.4 onwards.
*
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/#manage-users-and-teams-permissions-for-a-service-account-in-grafana)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const test = new grafana.oss.ServiceAccount("test", {
* name: "sa-terraform-test",
* role: "Editor",
* isDisabled: false,
* });
* const testTeam = new grafana.oss.Team("test_team", {name: "tf_test_team"});
* const testUser = new grafana.oss.User("test_user", {
* email: "tf_user@test.com",
* login: "tf_user@test.com",
* password: "password",
* });
* const testPermissions = new grafana.oss.ServiceAccountPermission("test_permissions", {
* serviceAccountId: test.id,
* permissions: [
* {
* userId: testUser.id,
* permission: "Edit",
* },
* {
* teamId: testTeam.id,
* permission: "Admin",
* },
* ],
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/serviceAccountPermission:ServiceAccountPermission name "{{ serviceAccountID }}"
* ```
*
* ```sh
* $ pulumi import grafana:index/serviceAccountPermission:ServiceAccountPermission name "{{ orgID }}:{{ serviceAccountID }}"
* ```
*
* @deprecated grafana.index/serviceaccountpermission.ServiceAccountPermission has been deprecated in favor of grafana.oss/serviceaccountpermission.ServiceAccountPermission
*/
export declare class ServiceAccountPermission extends pulumi.CustomResource {
/**
* Get an existing ServiceAccountPermission 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?: ServiceAccountPermissionState, opts?: pulumi.CustomResourceOptions): ServiceAccountPermission;
/**
* Returns true if the given object is an instance of ServiceAccountPermission. 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 ServiceAccountPermission;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
readonly orgId: pulumi.Output<string | undefined>;
/**
* The permission items to add/update. Items that are omitted from the list will be removed.
*/
readonly permissions: pulumi.Output<outputs.ServiceAccountPermissionPermission[] | undefined>;
/**
* The id of the service account.
*/
readonly serviceAccountId: pulumi.Output<string>;
/**
* Create a ServiceAccountPermission 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.
*/
/** @deprecated grafana.index/serviceaccountpermission.ServiceAccountPermission has been deprecated in favor of grafana.oss/serviceaccountpermission.ServiceAccountPermission */
constructor(name: string, args: ServiceAccountPermissionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ServiceAccountPermission resources.
*/
export interface ServiceAccountPermissionState {
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* The permission items to add/update. Items that are omitted from the list will be removed.
*/
permissions?: pulumi.Input<pulumi.Input<inputs.ServiceAccountPermissionPermission>[]>;
/**
* The id of the service account.
*/
serviceAccountId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ServiceAccountPermission resource.
*/
export interface ServiceAccountPermissionArgs {
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* The permission items to add/update. Items that are omitted from the list will be removed.
*/
permissions?: pulumi.Input<pulumi.Input<inputs.ServiceAccountPermissionPermission>[]>;
/**
* The id of the service account.
*/
serviceAccountId: pulumi.Input<string>;
}