@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
219 lines (218 loc) • 7.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* This data source allows you to look up an existing Grafana Cloud Azure Credential resource in your stack.
*
* See the Grafana Provider configuration docs
* for information on authentication and required access policy scopes.
*
* * [Official Grafana Cloud documentation](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/azure/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const testAzureCredential = new grafana.cloudprovider.AzureCredential("test", {
* stackId: "1",
* name: "test-name",
* clientId: "my-client-id",
* clientSecret: "my-client-secret",
* tenantId: "my-tenant-id",
* resourceTagsToAddToMetrics: [
* "tag1",
* "tag2",
* ],
* resourceDiscoveryTagFilters: [
* {
* key: "key-1",
* value: "value-1",
* },
* {
* key: "key-2",
* value: "value-2",
* },
* ],
* autoDiscoveryConfigurations: [{
* subscriptionId: "my-subscription_id",
* resourceTypeConfigurations: [
* {
* resourceTypeName: "Microsoft.App/containerApps",
* metricConfiguration: [{
* name: "TotalCoresQuotaUsed",
* }],
* },
* {
* resourceTypeName: "Microsoft.Storage/storageAccounts/tableServices",
* metricConfiguration: [{
* name: "Availability",
* dimensions: [
* "GeoType",
* "ApiName",
* ],
* aggregations: ["Average"],
* }],
* },
* ],
* }],
* });
* const test = grafana.cloudProvider.getAzureCredentialOutput({
* stackId: testAzureCredential.stackId,
* resourceId: testAzureCredential.resourceId,
* });
* ```
*/
export declare function getAzureCredential(args: GetAzureCredentialArgs, opts?: pulumi.InvokeOptions): Promise<GetAzureCredentialResult>;
/**
* A collection of arguments for invoking getAzureCredential.
*/
export interface GetAzureCredentialArgs {
/**
* The list of auto discovery configurations.
*/
autoDiscoveryConfigurations?: inputs.cloudProvider.GetAzureCredentialAutoDiscoveryConfiguration[];
/**
* The list of tag filters to apply to resources.
*/
resourceDiscoveryTagFilters?: inputs.cloudProvider.GetAzureCredentialResourceDiscoveryTagFilter[];
/**
* The ID given by the Grafana Cloud Provider API to this Azure Credential resource.
*/
resourceId: string;
/**
* The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
*/
stackId: string;
}
/**
* A collection of values returned by getAzureCredential.
*/
export interface GetAzureCredentialResult {
/**
* The list of auto discovery configurations.
*/
readonly autoDiscoveryConfigurations?: outputs.cloudProvider.GetAzureCredentialAutoDiscoveryConfiguration[];
/**
* The client ID of the Azure Credential.
*/
readonly clientId: string;
/**
* The client secret of the Azure Credential.
*/
readonly clientSecret: string;
/**
* The Terraform Resource ID. This has the format "{{ stack*id }}:{{ resource*id }}".
*/
readonly id: string;
/**
* The name of the Azure Credential.
*/
readonly name: string;
/**
* The list of tag filters to apply to resources.
*/
readonly resourceDiscoveryTagFilters?: outputs.cloudProvider.GetAzureCredentialResourceDiscoveryTagFilter[];
/**
* The ID given by the Grafana Cloud Provider API to this Azure Credential resource.
*/
readonly resourceId: string;
/**
* The list of resource tags to add to metrics.
*/
readonly resourceTagsToAddToMetrics: string[];
/**
* The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
*/
readonly stackId: string;
/**
* The tenant ID of the Azure Credential.
*/
readonly tenantId: string;
}
/**
* This data source allows you to look up an existing Grafana Cloud Azure Credential resource in your stack.
*
* See the Grafana Provider configuration docs
* for information on authentication and required access policy scopes.
*
* * [Official Grafana Cloud documentation](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/azure/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const testAzureCredential = new grafana.cloudprovider.AzureCredential("test", {
* stackId: "1",
* name: "test-name",
* clientId: "my-client-id",
* clientSecret: "my-client-secret",
* tenantId: "my-tenant-id",
* resourceTagsToAddToMetrics: [
* "tag1",
* "tag2",
* ],
* resourceDiscoveryTagFilters: [
* {
* key: "key-1",
* value: "value-1",
* },
* {
* key: "key-2",
* value: "value-2",
* },
* ],
* autoDiscoveryConfigurations: [{
* subscriptionId: "my-subscription_id",
* resourceTypeConfigurations: [
* {
* resourceTypeName: "Microsoft.App/containerApps",
* metricConfiguration: [{
* name: "TotalCoresQuotaUsed",
* }],
* },
* {
* resourceTypeName: "Microsoft.Storage/storageAccounts/tableServices",
* metricConfiguration: [{
* name: "Availability",
* dimensions: [
* "GeoType",
* "ApiName",
* ],
* aggregations: ["Average"],
* }],
* },
* ],
* }],
* });
* const test = grafana.cloudProvider.getAzureCredentialOutput({
* stackId: testAzureCredential.stackId,
* resourceId: testAzureCredential.resourceId,
* });
* ```
*/
export declare function getAzureCredentialOutput(args: GetAzureCredentialOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAzureCredentialResult>;
/**
* A collection of arguments for invoking getAzureCredential.
*/
export interface GetAzureCredentialOutputArgs {
/**
* The list of auto discovery configurations.
*/
autoDiscoveryConfigurations?: pulumi.Input<pulumi.Input<inputs.cloudProvider.GetAzureCredentialAutoDiscoveryConfigurationArgs>[]>;
/**
* The list of tag filters to apply to resources.
*/
resourceDiscoveryTagFilters?: pulumi.Input<pulumi.Input<inputs.cloudProvider.GetAzureCredentialResourceDiscoveryTagFilterArgs>[]>;
/**
* The ID given by the Grafana Cloud Provider API to this Azure Credential resource.
*/
resourceId: pulumi.Input<string>;
/**
* The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
*/
stackId: pulumi.Input<string>;
}