@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
208 lines (207 loc) • 7.36 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* This resource allows you to autodiscover resources in your Azure tenant and scrape Azure Monitor metrics for those resources in Grafana Cloud without needing to run your own infrastructure.
*
* 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 test = 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"],
* }],
* },
* ],
* }],
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_cloud_provider_azure_credential.name "{{ stack_id }}:{{ resource_id }}"
* ```
*/
export declare class AzureCredential extends pulumi.CustomResource {
/**
* Get an existing AzureCredential 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?: AzureCredentialState, opts?: pulumi.CustomResourceOptions): AzureCredential;
/**
* Returns true if the given object is an instance of AzureCredential. 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 AzureCredential;
/**
* The list of auto discovery configurations.
*/
readonly autoDiscoveryConfigurations: pulumi.Output<outputs.cloudProvider.AzureCredentialAutoDiscoveryConfiguration[] | undefined>;
/**
* The client ID of the Azure Credential.
*/
readonly clientId: pulumi.Output<string>;
/**
* The client secret of the Azure Credential.
*/
readonly clientSecret: pulumi.Output<string>;
/**
* The name of the Azure Credential.
*/
readonly name: pulumi.Output<string>;
/**
* The list of tag filters to apply to resources.
*/
readonly resourceDiscoveryTagFilters: pulumi.Output<outputs.cloudProvider.AzureCredentialResourceDiscoveryTagFilter[] | undefined>;
/**
* The ID given by the Grafana Cloud Provider API to this Azure Credential resource.
*/
readonly resourceId: pulumi.Output<string>;
/**
* The list of resource tags to add to metrics.
*/
readonly resourceTagsToAddToMetrics: pulumi.Output<string[] | undefined>;
/**
* The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
*/
readonly stackId: pulumi.Output<string>;
/**
* The tenant ID of the Azure Credential.
*/
readonly tenantId: pulumi.Output<string>;
/**
* Create a AzureCredential 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: AzureCredentialArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AzureCredential resources.
*/
export interface AzureCredentialState {
/**
* The list of auto discovery configurations.
*/
autoDiscoveryConfigurations?: pulumi.Input<pulumi.Input<inputs.cloudProvider.AzureCredentialAutoDiscoveryConfiguration>[]>;
/**
* The client ID of the Azure Credential.
*/
clientId?: pulumi.Input<string>;
/**
* The client secret of the Azure Credential.
*/
clientSecret?: pulumi.Input<string>;
/**
* The name of the Azure Credential.
*/
name?: pulumi.Input<string>;
/**
* The list of tag filters to apply to resources.
*/
resourceDiscoveryTagFilters?: pulumi.Input<pulumi.Input<inputs.cloudProvider.AzureCredentialResourceDiscoveryTagFilter>[]>;
/**
* The ID given by the Grafana Cloud Provider API to this Azure Credential resource.
*/
resourceId?: pulumi.Input<string>;
/**
* The list of resource tags to add to metrics.
*/
resourceTagsToAddToMetrics?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
*/
stackId?: pulumi.Input<string>;
/**
* The tenant ID of the Azure Credential.
*/
tenantId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AzureCredential resource.
*/
export interface AzureCredentialArgs {
/**
* The list of auto discovery configurations.
*/
autoDiscoveryConfigurations?: pulumi.Input<pulumi.Input<inputs.cloudProvider.AzureCredentialAutoDiscoveryConfiguration>[]>;
/**
* The client ID of the Azure Credential.
*/
clientId: pulumi.Input<string>;
/**
* The client secret of the Azure Credential.
*/
clientSecret: pulumi.Input<string>;
/**
* The name of the Azure Credential.
*/
name?: pulumi.Input<string>;
/**
* The list of tag filters to apply to resources.
*/
resourceDiscoveryTagFilters?: pulumi.Input<pulumi.Input<inputs.cloudProvider.AzureCredentialResourceDiscoveryTagFilter>[]>;
/**
* The list of resource tags to add to metrics.
*/
resourceTagsToAddToMetrics?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
*/
stackId: pulumi.Input<string>;
/**
* The tenant ID of the Azure Credential.
*/
tenantId: pulumi.Input<string>;
}