@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
154 lines • 5.56 kB
JavaScript
"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAzureCredentialOutput = exports.getAzureCredential = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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,
* });
* ```
*/
function getAzureCredential(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("grafana:cloudProvider/getAzureCredential:getAzureCredential", {
"autoDiscoveryConfigurations": args.autoDiscoveryConfigurations,
"resourceDiscoveryTagFilters": args.resourceDiscoveryTagFilters,
"resourceId": args.resourceId,
"stackId": args.stackId,
}, opts);
}
exports.getAzureCredential = getAzureCredential;
/**
* 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,
* });
* ```
*/
function getAzureCredentialOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("grafana:cloudProvider/getAzureCredential:getAzureCredential", {
"autoDiscoveryConfigurations": args.autoDiscoveryConfigurations,
"resourceDiscoveryTagFilters": args.resourceDiscoveryTagFilters,
"resourceId": args.resourceId,
"stackId": args.stackId,
}, opts);
}
exports.getAzureCredentialOutput = getAzureCredentialOutput;
//# sourceMappingURL=getAzureCredential.js.map