@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
108 lines (107 loc) • 3.82 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages service accounts of a Grafana Cloud stack using the Cloud API
* This can be used to bootstrap a management service account for a new stack
*
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/)
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api)
*
* Required access policy scopes:
*
* * stacks:read
* * stack-service-accounts:write
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const cloudSa = new grafana.cloud.StackServiceAccount("cloud_sa", {
* stackSlug: "<your stack slug>",
* name: "cloud service account",
* role: "Admin",
* isDisabled: false,
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:cloud/stackServiceAccount:StackServiceAccount name "{{ stackSlug }}:{{ serviceAccountID }}"
* ```
*/
export declare class StackServiceAccount extends pulumi.CustomResource {
/**
* Get an existing StackServiceAccount 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?: StackServiceAccountState, opts?: pulumi.CustomResourceOptions): StackServiceAccount;
/**
* Returns true if the given object is an instance of StackServiceAccount. 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 StackServiceAccount;
/**
* The disabled status for the service account. Defaults to `false`.
*/
readonly isDisabled: pulumi.Output<boolean | undefined>;
/**
* The name of the service account.
*/
readonly name: pulumi.Output<string>;
/**
* The basic role of the service account in the organization.
*/
readonly role: pulumi.Output<string>;
readonly stackSlug: pulumi.Output<string>;
/**
* Create a StackServiceAccount 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: StackServiceAccountArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering StackServiceAccount resources.
*/
export interface StackServiceAccountState {
/**
* The disabled status for the service account. Defaults to `false`.
*/
isDisabled?: pulumi.Input<boolean>;
/**
* The name of the service account.
*/
name?: pulumi.Input<string>;
/**
* The basic role of the service account in the organization.
*/
role?: pulumi.Input<string>;
stackSlug?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a StackServiceAccount resource.
*/
export interface StackServiceAccountArgs {
/**
* The disabled status for the service account. Defaults to `false`.
*/
isDisabled?: pulumi.Input<boolean>;
/**
* The name of the service account.
*/
name?: pulumi.Input<string>;
/**
* The basic role of the service account in the organization.
*/
role: pulumi.Input<string>;
stackSlug: pulumi.Input<string>;
}