Grafana

v0.0.3 published on Sunday, Sep 18, 2022 by lbrlabs

DataSource

The required arguments for this resource vary depending on the type of data source selected (via the ’type’ argument).

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;

return await Deployment.RunAsync(() => 
{
    var arbitrary_data = new Grafana.DataSource("arbitrary-data", new()
    {
        Type = "stackdriver",
        JsonDataEncoded = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["tokenUri"] = "https://oauth2.googleapis.com/token",
            ["authenticationType"] = "jwt",
            ["defaultProject"] = "default-project",
            ["clientEmail"] = "client-email@default-project.iam.gserviceaccount.com",
        }),
        SecureJsonDataEncoded = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["privateKey"] = @"-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
",
        }),
    });

    var influxdb = new Grafana.DataSource("influxdb", new()
    {
        Type = "influxdb",
        Url = "http://influxdb.example.net:8086/",
        Username = "myapp",
        Password = "foobarbaz",
        DatabaseName = influxdb_database.Metrics.Name,
    });

    var cloudwatch = new Grafana.DataSource("cloudwatch", new()
    {
        Type = "cloudwatch",
        JsonDatas = new[]
        {
            new Grafana.Inputs.DataSourceJsonDataArgs
            {
                DefaultRegion = "us-east-1",
                AuthType = "keys",
            },
        },
        SecureJsonDatas = new[]
        {
            new Grafana.Inputs.DataSourceSecureJsonDataArgs
            {
                AccessKey = "123",
                SecretKey = "456",
            },
        },
    });

    var prometheus = new Grafana.DataSource("prometheus", new()
    {
        Type = "prometheus",
        Url = "https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-1234567890/",
        JsonDatas = new[]
        {
            new Grafana.Inputs.DataSourceJsonDataArgs
            {
                HttpMethod = "POST",
                Sigv4Auth = true,
                Sigv4AuthType = "default",
                Sigv4Region = "eu-west-1",
            },
        },
    });

    var stackdriver = new Grafana.DataSource("stackdriver", new()
    {
        Type = "stackdriver",
        JsonDatas = new[]
        {
            new Grafana.Inputs.DataSourceJsonDataArgs
            {
                TokenUri = "https://oauth2.googleapis.com/token",
                AuthenticationType = "jwt",
                DefaultProject = "default-project",
                ClientEmail = "client-email@default-project.iam.gserviceaccount.com",
            },
        },
        SecureJsonDatas = new[]
        {
            new Grafana.Inputs.DataSourceSecureJsonDataArgs
            {
                PrivateKey = @"-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
",
            },
        },
    });

});
package main

import (
	"encoding/json"

	"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"tokenUri":           "https://oauth2.googleapis.com/token",
			"authenticationType": "jwt",
			"defaultProject":     "default-project",
			"clientEmail":        "client-email@default-project.iam.gserviceaccount.com",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"privateKey": "-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n",
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		_, err = grafana.NewDataSource(ctx, "arbitrary-data", &grafana.DataSourceArgs{
			Type:                  pulumi.String("stackdriver"),
			JsonDataEncoded:       pulumi.String(json0),
			SecureJsonDataEncoded: pulumi.String(json1),
		})
		if err != nil {
			return err
		}
		_, err = grafana.NewDataSource(ctx, "influxdb", &grafana.DataSourceArgs{
			Type:         pulumi.String("influxdb"),
			Url:          pulumi.String("http://influxdb.example.net:8086/"),
			Username:     pulumi.String("myapp"),
			Password:     pulumi.String("foobarbaz"),
			DatabaseName: pulumi.Any(influxdb_database.Metrics.Name),
		})
		if err != nil {
			return err
		}
		_, err = grafana.NewDataSource(ctx, "cloudwatch", &grafana.DataSourceArgs{
			Type: pulumi.String("cloudwatch"),
			JsonDatas: DataSourceJsonDataArray{
				&DataSourceJsonDataArgs{
					DefaultRegion: pulumi.String("us-east-1"),
					AuthType:      pulumi.String("keys"),
				},
			},
			SecureJsonDatas: DataSourceSecureJsonDataArray{
				&DataSourceSecureJsonDataArgs{
					AccessKey: pulumi.String("123"),
					SecretKey: pulumi.String("456"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = grafana.NewDataSource(ctx, "prometheus", &grafana.DataSourceArgs{
			Type: pulumi.String("prometheus"),
			Url:  pulumi.String("https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-1234567890/"),
			JsonDatas: DataSourceJsonDataArray{
				&DataSourceJsonDataArgs{
					HttpMethod:    pulumi.String("POST"),
					Sigv4Auth:     pulumi.Bool(true),
					Sigv4AuthType: pulumi.String("default"),
					Sigv4Region:   pulumi.String("eu-west-1"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = grafana.NewDataSource(ctx, "stackdriver", &grafana.DataSourceArgs{
			Type: pulumi.String("stackdriver"),
			JsonDatas: DataSourceJsonDataArray{
				&DataSourceJsonDataArgs{
					TokenUri:           pulumi.String("https://oauth2.googleapis.com/token"),
					AuthenticationType: pulumi.String("jwt"),
					DefaultProject:     pulumi.String("default-project"),
					ClientEmail:        pulumi.String("client-email@default-project.iam.gserviceaccount.com"),
				},
			},
			SecureJsonDatas: DataSourceSecureJsonDataArray{
				&DataSourceSecureJsonDataArgs{
					PrivateKey: pulumi.String("-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.DataSource;
import com.pulumi.grafana.DataSourceArgs;
import com.pulumi.grafana.inputs.DataSourceJsonDataArgs;
import com.pulumi.grafana.inputs.DataSourceSecureJsonDataArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var arbitrary_data = new DataSource("arbitrary-data", DataSourceArgs.builder()        
            .type("stackdriver")
            .jsonDataEncoded(serializeJson(
                jsonObject(
                    jsonProperty("tokenUri", "https://oauth2.googleapis.com/token"),
                    jsonProperty("authenticationType", "jwt"),
                    jsonProperty("defaultProject", "default-project"),
                    jsonProperty("clientEmail", "client-email@default-project.iam.gserviceaccount.com")
                )))
            .secureJsonDataEncoded(serializeJson(
                jsonObject(
                    jsonProperty("privateKey", """
-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
                    """)
                )))
            .build());

        var influxdb = new DataSource("influxdb", DataSourceArgs.builder()        
            .type("influxdb")
            .url("http://influxdb.example.net:8086/")
            .username("myapp")
            .password("foobarbaz")
            .databaseName(influxdb_database.metrics().name())
            .build());

        var cloudwatch = new DataSource("cloudwatch", DataSourceArgs.builder()        
            .type("cloudwatch")
            .jsonDatas(DataSourceJsonDataArgs.builder()
                .defaultRegion("us-east-1")
                .authType("keys")
                .build())
            .secureJsonDatas(DataSourceSecureJsonDataArgs.builder()
                .accessKey("123")
                .secretKey("456")
                .build())
            .build());

        var prometheus = new DataSource("prometheus", DataSourceArgs.builder()        
            .type("prometheus")
            .url("https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-1234567890/")
            .jsonDatas(DataSourceJsonDataArgs.builder()
                .httpMethod("POST")
                .sigv4Auth(true)
                .sigv4AuthType("default")
                .sigv4Region("eu-west-1")
                .build())
            .build());

        var stackdriver = new DataSource("stackdriver", DataSourceArgs.builder()        
            .type("stackdriver")
            .jsonDatas(DataSourceJsonDataArgs.builder()
                .tokenUri("https://oauth2.googleapis.com/token")
                .authenticationType("jwt")
                .defaultProject("default-project")
                .clientEmail("client-email@default-project.iam.gserviceaccount.com")
                .build())
            .secureJsonDatas(DataSourceSecureJsonDataArgs.builder()
                .privateKey("""
-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
                """)
                .build())
            .build());

    }
}
import pulumi
import json
import lbrlabs_pulumi_grafana as grafana

arbitrary_data = grafana.DataSource("arbitrary-data",
    type="stackdriver",
    json_data_encoded=json.dumps({
        "tokenUri": "https://oauth2.googleapis.com/token",
        "authenticationType": "jwt",
        "defaultProject": "default-project",
        "clientEmail": "client-email@default-project.iam.gserviceaccount.com",
    }),
    secure_json_data_encoded=json.dumps({
        "privateKey": """-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
""",
    }))
influxdb = grafana.DataSource("influxdb",
    type="influxdb",
    url="http://influxdb.example.net:8086/",
    username="myapp",
    password="foobarbaz",
    database_name=influxdb_database["metrics"]["name"])
cloudwatch = grafana.DataSource("cloudwatch",
    type="cloudwatch",
    json_datas=[grafana.DataSourceJsonDataArgs(
        default_region="us-east-1",
        auth_type="keys",
    )],
    secure_json_datas=[grafana.DataSourceSecureJsonDataArgs(
        access_key="123",
        secret_key="456",
    )])
prometheus = grafana.DataSource("prometheus",
    type="prometheus",
    url="https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-1234567890/",
    json_datas=[grafana.DataSourceJsonDataArgs(
        http_method="POST",
        sigv4_auth=True,
        sigv4_auth_type="default",
        sigv4_region="eu-west-1",
    )])
stackdriver = grafana.DataSource("stackdriver",
    type="stackdriver",
    json_datas=[grafana.DataSourceJsonDataArgs(
        token_uri="https://oauth2.googleapis.com/token",
        authentication_type="jwt",
        default_project="default-project",
        client_email="client-email@default-project.iam.gserviceaccount.com",
    )],
    secure_json_datas=[grafana.DataSourceSecureJsonDataArgs(
        private_key="""-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
""",
    )])
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@lbrlabs/pulumi-grafana";

const arbitrary_data = new grafana.DataSource("arbitrary-data", {
    type: "stackdriver",
    jsonDataEncoded: JSON.stringify({
        tokenUri: "https://oauth2.googleapis.com/token",
        authenticationType: "jwt",
        defaultProject: "default-project",
        clientEmail: "client-email@default-project.iam.gserviceaccount.com",
    }),
    secureJsonDataEncoded: JSON.stringify({
        privateKey: `-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
`,
    }),
});
const influxdb = new grafana.DataSource("influxdb", {
    type: "influxdb",
    url: "http://influxdb.example.net:8086/",
    username: "myapp",
    password: "foobarbaz",
    databaseName: influxdb_database.metrics.name,
});
const cloudwatch = new grafana.DataSource("cloudwatch", {
    type: "cloudwatch",
    jsonDatas: [{
        defaultRegion: "us-east-1",
        authType: "keys",
    }],
    secureJsonDatas: [{
        accessKey: "123",
        secretKey: "456",
    }],
});
const prometheus = new grafana.DataSource("prometheus", {
    type: "prometheus",
    url: "https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-1234567890/",
    jsonDatas: [{
        httpMethod: "POST",
        sigv4Auth: true,
        sigv4AuthType: "default",
        sigv4Region: "eu-west-1",
    }],
});
const stackdriver = new grafana.DataSource("stackdriver", {
    type: "stackdriver",
    jsonDatas: [{
        tokenUri: "https://oauth2.googleapis.com/token",
        authenticationType: "jwt",
        defaultProject: "default-project",
        clientEmail: "client-email@default-project.iam.gserviceaccount.com",
    }],
    secureJsonDatas: [{
        privateKey: `-----BEGIN PRIVATE KEY-----
private-key
-----END PRIVATE KEY-----
`,
    }],
});
resources:
  arbitrary-data:
    type: grafana:DataSource
    properties:
      type: stackdriver
      jsonDataEncoded:
        Fn::ToJSON:
          tokenUri: https://oauth2.googleapis.com/token
          authenticationType: jwt
          defaultProject: default-project
          clientEmail: client-email@default-project.iam.gserviceaccount.com
      secureJsonDataEncoded:
        Fn::ToJSON:
          privateKey: |
            -----BEGIN PRIVATE KEY-----
            private-key
            -----END PRIVATE KEY-----            
  influxdb:
    type: grafana:DataSource
    properties:
      type: influxdb
      url: http://influxdb.example.net:8086/
      username: myapp
      password: foobarbaz
      databaseName: ${influxdb_database.metrics.name}
  cloudwatch:
    type: grafana:DataSource
    properties:
      type: cloudwatch
      jsonDatas:
        - defaultRegion: us-east-1
          authType: keys
      secureJsonDatas:
        - accessKey: 123
          secretKey: 456
  prometheus:
    type: grafana:DataSource
    properties:
      type: prometheus
      url: https://aps-workspaces.eu-west-1.amazonaws.com/workspaces/ws-1234567890/
      jsonDatas:
        - httpMethod: POST
          sigv4Auth: true
          sigv4AuthType: default
          sigv4Region: eu-west-1
  stackdriver:
    type: grafana:DataSource
    properties:
      type: stackdriver
      jsonDatas:
        - tokenUri: https://oauth2.googleapis.com/token
          authenticationType: jwt
          defaultProject: default-project
          clientEmail: client-email@default-project.iam.gserviceaccount.com
      secureJsonDatas:
        - privateKey: |
            -----BEGIN PRIVATE KEY-----
            private-key
            -----END PRIVATE KEY-----            

Create a DataSource Resource

new DataSource(name: string, args: DataSourceArgs, opts?: CustomResourceOptions);
@overload
def DataSource(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               access_mode: Optional[str] = None,
               basic_auth_enabled: Optional[bool] = None,
               basic_auth_password: Optional[str] = None,
               basic_auth_username: Optional[str] = None,
               database_name: Optional[str] = None,
               http_headers: Optional[Mapping[str, str]] = None,
               is_default: Optional[bool] = None,
               json_data_encoded: Optional[str] = None,
               json_datas: Optional[Sequence[DataSourceJsonDataArgs]] = None,
               name: Optional[str] = None,
               password: Optional[str] = None,
               secure_json_data_encoded: Optional[str] = None,
               secure_json_datas: Optional[Sequence[DataSourceSecureJsonDataArgs]] = None,
               type: Optional[str] = None,
               uid: Optional[str] = None,
               url: Optional[str] = None,
               username: Optional[str] = None)
@overload
def DataSource(resource_name: str,
               args: DataSourceArgs,
               opts: Optional[ResourceOptions] = None)
func NewDataSource(ctx *Context, name string, args DataSourceArgs, opts ...ResourceOption) (*DataSource, error)
public DataSource(string name, DataSourceArgs args, CustomResourceOptions? opts = null)
public DataSource(String name, DataSourceArgs args)
public DataSource(String name, DataSourceArgs args, CustomResourceOptions options)
type: grafana:DataSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DataSource Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DataSource resource accepts the following input properties:

Type string

The data source type. Must be one of the supported data source keywords.

AccessMode string

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

BasicAuthEnabled bool

Whether to enable basic auth for the data source. Defaults to false.

BasicAuthPassword string

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

BasicAuthUsername string

Basic auth username. Defaults to ``.

DatabaseName string

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

HttpHeaders Dictionary<string, string>

Custom HTTP headers

IsDefault bool

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

JsonDataEncoded string

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

JsonDatas List<Lbrlabs.PulumiPackage.Grafana.Inputs.DataSourceJsonDataArgs>

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Name string

A unique name for the data source.

Password string

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

SecureJsonDataEncoded string

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

SecureJsonDatas List<Lbrlabs.PulumiPackage.Grafana.Inputs.DataSourceSecureJsonDataArgs>

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Uid string

Unique identifier. If unset, this will be automatically generated.

Url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

Username string

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

Type string

The data source type. Must be one of the supported data source keywords.

AccessMode string

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

BasicAuthEnabled bool

Whether to enable basic auth for the data source. Defaults to false.

BasicAuthPassword string

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

BasicAuthUsername string

Basic auth username. Defaults to ``.

DatabaseName string

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

HttpHeaders map[string]string

Custom HTTP headers

IsDefault bool

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

JsonDataEncoded string

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

JsonDatas []DataSourceJsonDataArgs

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Name string

A unique name for the data source.

Password string

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

SecureJsonDataEncoded string

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

SecureJsonDatas []DataSourceSecureJsonDataArgs

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Uid string

Unique identifier. If unset, this will be automatically generated.

Url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

Username string

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

type String

The data source type. Must be one of the supported data source keywords.

accessMode String

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basicAuthEnabled Boolean

Whether to enable basic auth for the data source. Defaults to false.

basicAuthPassword String

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basicAuthUsername String

Basic auth username. Defaults to ``.

databaseName String

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

httpHeaders Map<String,String>

Custom HTTP headers

isDefault Boolean

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

jsonDataEncoded String

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

jsonDatas List<DataSourceJsonDataArgs>

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name String

A unique name for the data source.

password String

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secureJsonDataEncoded String

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secureJsonDatas List<DataSourceSecureJsonDataArgs>

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

uid String

Unique identifier. If unset, this will be automatically generated.

url String

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username String

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

type string

The data source type. Must be one of the supported data source keywords.

accessMode string

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basicAuthEnabled boolean

Whether to enable basic auth for the data source. Defaults to false.

basicAuthPassword string

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basicAuthUsername string

Basic auth username. Defaults to ``.

databaseName string

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

httpHeaders {[key: string]: string}

Custom HTTP headers

isDefault boolean

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

jsonDataEncoded string

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

jsonDatas DataSourceJsonDataArgs[]

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name string

A unique name for the data source.

password string

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secureJsonDataEncoded string

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secureJsonDatas DataSourceSecureJsonDataArgs[]

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

uid string

Unique identifier. If unset, this will be automatically generated.

url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username string

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

type str

The data source type. Must be one of the supported data source keywords.

access_mode str

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basic_auth_enabled bool

Whether to enable basic auth for the data source. Defaults to false.

basic_auth_password str

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basic_auth_username str

Basic auth username. Defaults to ``.

database_name str

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

http_headers Mapping[str, str]

Custom HTTP headers

is_default bool

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

json_data_encoded str

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

json_datas Sequence[DataSourceJsonDataArgs]

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name str

A unique name for the data source.

password str

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secure_json_data_encoded str

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secure_json_datas Sequence[DataSourceSecureJsonDataArgs]

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

uid str

Unique identifier. If unset, this will be automatically generated.

url str

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username str

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

type String

The data source type. Must be one of the supported data source keywords.

accessMode String

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basicAuthEnabled Boolean

Whether to enable basic auth for the data source. Defaults to false.

basicAuthPassword String

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basicAuthUsername String

Basic auth username. Defaults to ``.

databaseName String

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

httpHeaders Map<String>

Custom HTTP headers

isDefault Boolean

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

jsonDataEncoded String

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

jsonDatas List<Property Map>

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name String

A unique name for the data source.

password String

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secureJsonDataEncoded String

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secureJsonDatas List<Property Map>

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

uid String

Unique identifier. If unset, this will be automatically generated.

url String

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username String

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataSource resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing DataSource Resource

Get an existing DataSource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DataSourceState, opts?: CustomResourceOptions): DataSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_mode: Optional[str] = None,
        basic_auth_enabled: Optional[bool] = None,
        basic_auth_password: Optional[str] = None,
        basic_auth_username: Optional[str] = None,
        database_name: Optional[str] = None,
        http_headers: Optional[Mapping[str, str]] = None,
        is_default: Optional[bool] = None,
        json_data_encoded: Optional[str] = None,
        json_datas: Optional[Sequence[DataSourceJsonDataArgs]] = None,
        name: Optional[str] = None,
        password: Optional[str] = None,
        secure_json_data_encoded: Optional[str] = None,
        secure_json_datas: Optional[Sequence[DataSourceSecureJsonDataArgs]] = None,
        type: Optional[str] = None,
        uid: Optional[str] = None,
        url: Optional[str] = None,
        username: Optional[str] = None) -> DataSource
func GetDataSource(ctx *Context, name string, id IDInput, state *DataSourceState, opts ...ResourceOption) (*DataSource, error)
public static DataSource Get(string name, Input<string> id, DataSourceState? state, CustomResourceOptions? opts = null)
public static DataSource get(String name, Output<String> id, DataSourceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessMode string

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

BasicAuthEnabled bool

Whether to enable basic auth for the data source. Defaults to false.

BasicAuthPassword string

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

BasicAuthUsername string

Basic auth username. Defaults to ``.

DatabaseName string

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

HttpHeaders Dictionary<string, string>

Custom HTTP headers

IsDefault bool

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

JsonDataEncoded string

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

JsonDatas List<Lbrlabs.PulumiPackage.Grafana.Inputs.DataSourceJsonDataArgs>

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Name string

A unique name for the data source.

Password string

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

SecureJsonDataEncoded string

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

SecureJsonDatas List<Lbrlabs.PulumiPackage.Grafana.Inputs.DataSourceSecureJsonDataArgs>

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Type string

The data source type. Must be one of the supported data source keywords.

Uid string

Unique identifier. If unset, this will be automatically generated.

Url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

Username string

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

AccessMode string

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

BasicAuthEnabled bool

Whether to enable basic auth for the data source. Defaults to false.

BasicAuthPassword string

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

BasicAuthUsername string

Basic auth username. Defaults to ``.

DatabaseName string

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

HttpHeaders map[string]string

Custom HTTP headers

IsDefault bool

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

JsonDataEncoded string

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

JsonDatas []DataSourceJsonDataArgs

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Name string

A unique name for the data source.

Password string

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

SecureJsonDataEncoded string

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

SecureJsonDatas []DataSourceSecureJsonDataArgs

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Type string

The data source type. Must be one of the supported data source keywords.

Uid string

Unique identifier. If unset, this will be automatically generated.

Url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

Username string

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

accessMode String

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basicAuthEnabled Boolean

Whether to enable basic auth for the data source. Defaults to false.

basicAuthPassword String

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basicAuthUsername String

Basic auth username. Defaults to ``.

databaseName String

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

httpHeaders Map<String,String>

Custom HTTP headers

isDefault Boolean

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

jsonDataEncoded String

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

jsonDatas List<DataSourceJsonDataArgs>

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name String

A unique name for the data source.

password String

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secureJsonDataEncoded String

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secureJsonDatas List<DataSourceSecureJsonDataArgs>

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

type String

The data source type. Must be one of the supported data source keywords.

uid String

Unique identifier. If unset, this will be automatically generated.

url String

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username String

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

accessMode string

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basicAuthEnabled boolean

Whether to enable basic auth for the data source. Defaults to false.

basicAuthPassword string

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basicAuthUsername string

Basic auth username. Defaults to ``.

databaseName string

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

httpHeaders {[key: string]: string}

Custom HTTP headers

isDefault boolean

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

jsonDataEncoded string

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

jsonDatas DataSourceJsonDataArgs[]

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name string

A unique name for the data source.

password string

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secureJsonDataEncoded string

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secureJsonDatas DataSourceSecureJsonDataArgs[]

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

type string

The data source type. Must be one of the supported data source keywords.

uid string

Unique identifier. If unset, this will be automatically generated.

url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username string

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

access_mode str

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basic_auth_enabled bool

Whether to enable basic auth for the data source. Defaults to false.

basic_auth_password str

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basic_auth_username str

Basic auth username. Defaults to ``.

database_name str

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

http_headers Mapping[str, str]

Custom HTTP headers

is_default bool

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

json_data_encoded str

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

json_datas Sequence[DataSourceJsonDataArgs]

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name str

A unique name for the data source.

password str

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secure_json_data_encoded str

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secure_json_datas Sequence[DataSourceSecureJsonDataArgs]

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

type str

The data source type. Must be one of the supported data source keywords.

uid str

Unique identifier. If unset, this will be automatically generated.

url str

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username str

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

accessMode String

The method by which Grafana will access the data source: proxy or direct. Defaults to proxy.

basicAuthEnabled Boolean

Whether to enable basic auth for the data source. Defaults to false.

basicAuthPassword String

Basic auth password. Deprecated:Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

basicAuthUsername String

Basic auth username. Defaults to ``.

databaseName String

(Required by some data source types) The name of the database to use on the selected data source server. Defaults to ``.

httpHeaders Map<String>

Custom HTTP headers

isDefault Boolean

Whether to set the data source as default. This should only be true to a single data source. Defaults to false.

jsonDataEncoded String

Serialized JSON string containing the json data. Replaces the json_data attribute, this attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

jsonDatas List<Property Map>

(Required by some data source types). Deprecated: Use jsondataencoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

name String

A unique name for the data source.

password String

(Required by some data source types) The password to use to authenticate to the data source. Deprecated: Use securejsondata_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+. Defaults to ``.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes. This attribute is removed in Grafana 9.0+.

secureJsonDataEncoded String

Serialized JSON string containing the secure json data. Replaces the securejsondata attribute, this attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI.

secureJsonDatas List<Property Map>

Deprecated: Use securejsondata*encoded instead. It supports arbitrary JSON data, and therefore all attributes.

Deprecated:

Use secure_json_data_encoded instead. It supports arbitrary JSON data, and therefore all attributes.

type String

The data source type. Must be one of the supported data source keywords.

uid String

Unique identifier. If unset, this will be automatically generated.

url String

The URL for the data source. The type of URL required varies depending on the chosen data source type.

username String

(Required by some data source types) The username to use to authenticate to the data source. Defaults to ``.

Supporting Types

DataSourceJsonData

AssumeRoleArn string

(CloudWatch, Athena) The ARN of the role to be assumed by Grafana when using the CloudWatch or Athena data source.

AuthType string

(CloudWatch, Athena) The authentication type used to access the data source.

AuthenticationType string

(Stackdriver) The authentication type: jwt or gce.

Catalog string

(Athena) Athena catalog.

ClientEmail string

(Stackdriver) Service account email address.

ClientId string

(Azure Monitor) The service account client id.

CloudName string

(Azure Monitor) The cloud name.

ConnMaxLifetime int

(MySQL, PostgreSQL, and MSSQL) Maximum amount of time in seconds a connection may be reused (Grafana v5.4+).

CustomMetricsNamespaces string

(CloudWatch) A comma-separated list of custom namespaces to be queried by the CloudWatch data source.

Database string

(Athena) Name of the database within the catalog.

DefaultBucket string

(InfluxDB) The default bucket for the data source.

DefaultProject string

(Stackdriver) The default project for the data source.

DefaultRegion string

(CloudWatch, Athena) The default region for the data source.

DerivedFields List<Lbrlabs.PulumiPackage.Grafana.Inputs.DataSourceJsonDataDerivedField>

(Loki) See https://grafana.com/docs/grafana/latest/datasources/loki/#derived-fields

Encrypt string

(MSSQL) Connection SSL encryption handling: 'disable', 'false' or 'true'.

EsVersion string

(Elasticsearch) Elasticsearch semantic version (Grafana v8.0+).

ExternalId string

(CloudWatch, Athena) If you are assuming a role in another account, that has been created with an external ID, specify the external ID here.

GithubUrl string

(Github) Github URL

GraphiteVersion string

(Graphite) Graphite version.

HttpMethod string

(Prometheus) HTTP method to use for making requests.

Implementation string

(Alertmanager) Implementation of Alertmanager. Either 'cortex' or 'prometheus'

Interval string

(Elasticsearch) Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly'.

LogLevelField string

(Elasticsearch) Which field should be used to indicate the priority of the log message.

LogMessageField string

(Elasticsearch) Which field should be used as the log message.

ManageAlerts bool

(Prometheus) Manage alerts.

MaxConcurrentShardRequests int

(Elasticsearch) Maximum number of concurrent shard requests.

MaxIdleConns int

(MySQL, PostgreSQL and MSSQL) Maximum number of connections in the idle connection pool (Grafana v5.4+).

MaxLines int

(Loki) Upper limit for the number of log lines returned by Loki

MaxOpenConns int

(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).

OrgSlug string

(Sentry) Organization slug.

Organization string

(InfluxDB) An organization is a workspace for a group of users. All dashboards, tasks, buckets, members, etc., belong to an organization.

OutputLocation string

(Athena) AWS S3 bucket to store execution outputs. If not specified, the default query result location from the Workgroup configuration will be used.

PostgresVersion int

(PostgreSQL) Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, etc.

Profile string

(CloudWatch, Athena) The credentials profile name to use when authentication type is set as 'Credentials file'.

QueryTimeout string

(Prometheus) Timeout for queries made to the Prometheus data source in seconds.

Sigv4AssumeRoleArn string

(Elasticsearch and Prometheus) Specifies the ARN of an IAM role to assume.

Sigv4Auth bool

(Elasticsearch and Prometheus) Enable usage of SigV4.

Sigv4AuthType string

(Elasticsearch and Prometheus) The Sigv4 authentication provider to use: 'default', 'credentials' or 'keys' (AMG: 'workspace-iam-role').

Sigv4ExternalId string

(Elasticsearch and Prometheus) When assuming a role in another account use this external ID.

Sigv4Profile string

(Elasticsearch and Prometheus) Credentials profile name, leave blank for default.

Sigv4Region string

(Elasticsearch and Prometheus) AWS region to use for Sigv4.

SslMode string

(PostgreSQL) SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full'.

SubscriptionId string

(Azure Monitor) The subscription id

TenantId string

(Azure Monitor) Service account tenant ID.

TimeField string

(Elasticsearch) Which field that should be used as timestamp.

TimeInterval string

(Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL, and MSSQL) Lowest interval/step value that should be used for this data source. Sometimes called "Scrape Interval" in the Grafana UI.

Timescaledb bool

(PostgreSQL) Enable usage of TimescaleDB extension.

TlsAuth bool

(All) Enable TLS authentication using client cert configured in secure json data.

TlsAuthWithCaCert bool

(All) Enable TLS authentication using CA cert.

TlsConfigurationMethod string

(All) SSL Certificate configuration, either by ‘file-path’ or ‘file-content’.

TlsSkipVerify bool

(All) Controls whether a client verifies the server’s certificate chain and host name.

TokenUri string

(Stackdriver) The token URI used, provided in the service account key.

TracingDatasourceUid string

(Cloudwatch) The X-Ray datasource uid to associate to this Cloudwatch datasource.

TsdbResolution int

(OpenTSDB) Resolution.

TsdbVersion int

(OpenTSDB) Version.

Version string

(InfluxDB) InfluxQL or Flux.

Workgroup string

(Athena) Workgroup to use.

XpackEnabled bool

(Elasticsearch) Enable X-Pack support.

AssumeRoleArn string

(CloudWatch, Athena) The ARN of the role to be assumed by Grafana when using the CloudWatch or Athena data source.

AuthType string

(CloudWatch, Athena) The authentication type used to access the data source.

AuthenticationType string

(Stackdriver) The authentication type: jwt or gce.

Catalog string

(Athena) Athena catalog.

ClientEmail string

(Stackdriver) Service account email address.

ClientId string

(Azure Monitor) The service account client id.

CloudName string

(Azure Monitor) The cloud name.

ConnMaxLifetime int

(MySQL, PostgreSQL, and MSSQL) Maximum amount of time in seconds a connection may be reused (Grafana v5.4+).

CustomMetricsNamespaces string

(CloudWatch) A comma-separated list of custom namespaces to be queried by the CloudWatch data source.

Database string

(Athena) Name of the database within the catalog.

DefaultBucket string

(InfluxDB) The default bucket for the data source.

DefaultProject string

(Stackdriver) The default project for the data source.

DefaultRegion string

(CloudWatch, Athena) The default region for the data source.

DerivedFields []DataSourceJsonDataDerivedField

(Loki) See https://grafana.com/docs/grafana/latest/datasources/loki/#derived-fields

Encrypt string

(MSSQL) Connection SSL encryption handling: 'disable', 'false' or 'true'.

EsVersion string

(Elasticsearch) Elasticsearch semantic version (Grafana v8.0+).

ExternalId string

(CloudWatch, Athena) If you are assuming a role in another account, that has been created with an external ID, specify the external ID here.

GithubUrl string

(Github) Github URL

GraphiteVersion string

(Graphite) Graphite version.

HttpMethod string

(Prometheus) HTTP method to use for making requests.

Implementation string

(Alertmanager) Implementation of Alertmanager. Either 'cortex' or 'prometheus'

Interval string

(Elasticsearch) Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly'.

LogLevelField string

(Elasticsearch) Which field should be used to indicate the priority of the log message.

LogMessageField string

(Elasticsearch) Which field should be used as the log message.

ManageAlerts bool

(Prometheus) Manage alerts.

MaxConcurrentShardRequests int

(Elasticsearch) Maximum number of concurrent shard requests.

MaxIdleConns int

(MySQL, PostgreSQL and MSSQL) Maximum number of connections in the idle connection pool (Grafana v5.4+).

MaxLines int

(Loki) Upper limit for the number of log lines returned by Loki

MaxOpenConns int

(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).

OrgSlug string

(Sentry) Organization slug.

Organization string

(InfluxDB) An organization is a workspace for a group of users. All dashboards, tasks, buckets, members, etc., belong to an organization.

OutputLocation string

(Athena) AWS S3 bucket to store execution outputs. If not specified, the default query result location from the Workgroup configuration will be used.

PostgresVersion int

(PostgreSQL) Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, etc.

Profile string

(CloudWatch, Athena) The credentials profile name to use when authentication type is set as 'Credentials file'.

QueryTimeout string

(Prometheus) Timeout for queries made to the Prometheus data source in seconds.

Sigv4AssumeRoleArn string

(Elasticsearch and Prometheus) Specifies the ARN of an IAM role to assume.

Sigv4Auth bool

(Elasticsearch and Prometheus) Enable usage of SigV4.

Sigv4AuthType string

(Elasticsearch and Prometheus) The Sigv4 authentication provider to use: 'default', 'credentials' or 'keys' (AMG: 'workspace-iam-role').

Sigv4ExternalId string

(Elasticsearch and Prometheus) When assuming a role in another account use this external ID.

Sigv4Profile string

(Elasticsearch and Prometheus) Credentials profile name, leave blank for default.

Sigv4Region string

(Elasticsearch and Prometheus) AWS region to use for Sigv4.

SslMode string

(PostgreSQL) SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full'.

SubscriptionId string

(Azure Monitor) The subscription id

TenantId string

(Azure Monitor) Service account tenant ID.

TimeField string

(Elasticsearch) Which field that should be used as timestamp.

TimeInterval string

(Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL, and MSSQL) Lowest interval/step value that should be used for this data source. Sometimes called "Scrape Interval" in the Grafana UI.

Timescaledb bool

(PostgreSQL) Enable usage of TimescaleDB extension.

TlsAuth bool

(All) Enable TLS authentication using client cert configured in secure json data.

TlsAuthWithCaCert bool

(All) Enable TLS authentication using CA cert.

TlsConfigurationMethod string

(All) SSL Certificate configuration, either by ‘file-path’ or ‘file-content’.

TlsSkipVerify bool

(All) Controls whether a client verifies the server’s certificate chain and host name.

TokenUri string

(Stackdriver) The token URI used, provided in the service account key.

TracingDatasourceUid string

(Cloudwatch) The X-Ray datasource uid to associate to this Cloudwatch datasource.

TsdbResolution int

(OpenTSDB) Resolution.

TsdbVersion int

(OpenTSDB) Version.

Version string

(InfluxDB) InfluxQL or Flux.

Workgroup string

(Athena) Workgroup to use.

XpackEnabled bool

(Elasticsearch) Enable X-Pack support.

assumeRoleArn String

(CloudWatch, Athena) The ARN of the role to be assumed by Grafana when using the CloudWatch or Athena data source.

authType String

(CloudWatch, Athena) The authentication type used to access the data source.

authenticationType String

(Stackdriver) The authentication type: jwt or gce.

catalog String

(Athena) Athena catalog.

clientEmail String

(Stackdriver) Service account email address.

clientId String

(Azure Monitor) The service account client id.

cloudName String

(Azure Monitor) The cloud name.

connMaxLifetime Integer

(MySQL, PostgreSQL, and MSSQL) Maximum amount of time in seconds a connection may be reused (Grafana v5.4+).

customMetricsNamespaces String

(CloudWatch) A comma-separated list of custom namespaces to be queried by the CloudWatch data source.

database String

(Athena) Name of the database within the catalog.

defaultBucket String

(InfluxDB) The default bucket for the data source.

defaultProject String

(Stackdriver) The default project for the data source.

defaultRegion String

(CloudWatch, Athena) The default region for the data source.

derivedFields List<DataSourceJsonDataDerivedField>

(Loki) See https://grafana.com/docs/grafana/latest/datasources/loki/#derived-fields

encrypt String

(MSSQL) Connection SSL encryption handling: 'disable', 'false' or 'true'.

esVersion String

(Elasticsearch) Elasticsearch semantic version (Grafana v8.0+).

externalId String

(CloudWatch, Athena) If you are assuming a role in another account, that has been created with an external ID, specify the external ID here.

githubUrl String

(Github) Github URL

graphiteVersion String

(Graphite) Graphite version.

httpMethod String

(Prometheus) HTTP method to use for making requests.

implementation String

(Alertmanager) Implementation of Alertmanager. Either 'cortex' or 'prometheus'

interval String

(Elasticsearch) Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly'.

logLevelField String

(Elasticsearch) Which field should be used to indicate the priority of the log message.

logMessageField String

(Elasticsearch) Which field should be used as the log message.

manageAlerts Boolean

(Prometheus) Manage alerts.

maxConcurrentShardRequests Integer

(Elasticsearch) Maximum number of concurrent shard requests.

maxIdleConns Integer

(MySQL, PostgreSQL and MSSQL) Maximum number of connections in the idle connection pool (Grafana v5.4+).

maxLines Integer

(Loki) Upper limit for the number of log lines returned by Loki

maxOpenConns Integer

(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).

orgSlug String

(Sentry) Organization slug.

organization String

(InfluxDB) An organization is a workspace for a group of users. All dashboards, tasks, buckets, members, etc., belong to an organization.

outputLocation String

(Athena) AWS S3 bucket to store execution outputs. If not specified, the default query result location from the Workgroup configuration will be used.

postgresVersion Integer

(PostgreSQL) Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, etc.

profile String

(CloudWatch, Athena) The credentials profile name to use when authentication type is set as 'Credentials file'.

queryTimeout String

(Prometheus) Timeout for queries made to the Prometheus data source in seconds.

sigv4AssumeRoleArn String

(Elasticsearch and Prometheus) Specifies the ARN of an IAM role to assume.

sigv4Auth Boolean

(Elasticsearch and Prometheus) Enable usage of SigV4.

sigv4AuthType String

(Elasticsearch and Prometheus) The Sigv4 authentication provider to use: 'default', 'credentials' or 'keys' (AMG: 'workspace-iam-role').

sigv4ExternalId String

(Elasticsearch and Prometheus) When assuming a role in another account use this external ID.

sigv4Profile String

(Elasticsearch and Prometheus) Credentials profile name, leave blank for default.

sigv4Region String

(Elasticsearch and Prometheus) AWS region to use for Sigv4.

sslMode String

(PostgreSQL) SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full'.

subscriptionId String

(Azure Monitor) The subscription id

tenantId String

(Azure Monitor) Service account tenant ID.

timeField String

(Elasticsearch) Which field that should be used as timestamp.

timeInterval String

(Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL, and MSSQL) Lowest interval/step value that should be used for this data source. Sometimes called "Scrape Interval" in the Grafana UI.

timescaledb Boolean

(PostgreSQL) Enable usage of TimescaleDB extension.

tlsAuth Boolean

(All) Enable TLS authentication using client cert configured in secure json data.

tlsAuthWithCaCert Boolean

(All) Enable TLS authentication using CA cert.

tlsConfigurationMethod String

(All) SSL Certificate configuration, either by ‘file-path’ or ‘file-content’.

tlsSkipVerify Boolean

(All) Controls whether a client verifies the server’s certificate chain and host name.

tokenUri String

(Stackdriver) The token URI used, provided in the service account key.

tracingDatasourceUid String

(Cloudwatch) The X-Ray datasource uid to associate to this Cloudwatch datasource.

tsdbResolution Integer

(OpenTSDB) Resolution.

tsdbVersion Integer

(OpenTSDB) Version.

version String

(InfluxDB) InfluxQL or Flux.

workgroup String

(Athena) Workgroup to use.

xpackEnabled Boolean

(Elasticsearch) Enable X-Pack support.

assumeRoleArn string

(CloudWatch, Athena) The ARN of the role to be assumed by Grafana when using the CloudWatch or Athena data source.

authType string

(CloudWatch, Athena) The authentication type used to access the data source.

authenticationType string

(Stackdriver) The authentication type: jwt or gce.

catalog string

(Athena) Athena catalog.

clientEmail string

(Stackdriver) Service account email address.

clientId string

(Azure Monitor) The service account client id.

cloudName string

(Azure Monitor) The cloud name.

connMaxLifetime number

(MySQL, PostgreSQL, and MSSQL) Maximum amount of time in seconds a connection may be reused (Grafana v5.4+).

customMetricsNamespaces string

(CloudWatch) A comma-separated list of custom namespaces to be queried by the CloudWatch data source.

database string

(Athena) Name of the database within the catalog.

defaultBucket string

(InfluxDB) The default bucket for the data source.

defaultProject string

(Stackdriver) The default project for the data source.

defaultRegion string

(CloudWatch, Athena) The default region for the data source.

derivedFields DataSourceJsonDataDerivedField[]

(Loki) See https://grafana.com/docs/grafana/latest/datasources/loki/#derived-fields

encrypt string

(MSSQL) Connection SSL encryption handling: 'disable', 'false' or 'true'.

esVersion string

(Elasticsearch) Elasticsearch semantic version (Grafana v8.0+).

externalId string

(CloudWatch, Athena) If you are assuming a role in another account, that has been created with an external ID, specify the external ID here.

githubUrl string

(Github) Github URL

graphiteVersion string

(Graphite) Graphite version.

httpMethod string

(Prometheus) HTTP method to use for making requests.

implementation string

(Alertmanager) Implementation of Alertmanager. Either 'cortex' or 'prometheus'

interval string

(Elasticsearch) Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly'.

logLevelField string

(Elasticsearch) Which field should be used to indicate the priority of the log message.

logMessageField string

(Elasticsearch) Which field should be used as the log message.

manageAlerts boolean

(Prometheus) Manage alerts.

maxConcurrentShardRequests number

(Elasticsearch) Maximum number of concurrent shard requests.

maxIdleConns number

(MySQL, PostgreSQL and MSSQL) Maximum number of connections in the idle connection pool (Grafana v5.4+).

maxLines number

(Loki) Upper limit for the number of log lines returned by Loki

maxOpenConns number

(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).

orgSlug string

(Sentry) Organization slug.

organization string

(InfluxDB) An organization is a workspace for a group of users. All dashboards, tasks, buckets, members, etc., belong to an organization.

outputLocation string

(Athena) AWS S3 bucket to store execution outputs. If not specified, the default query result location from the Workgroup configuration will be used.

postgresVersion number

(PostgreSQL) Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, etc.

profile string

(CloudWatch, Athena) The credentials profile name to use when authentication type is set as 'Credentials file'.

queryTimeout string

(Prometheus) Timeout for queries made to the Prometheus data source in seconds.

sigv4AssumeRoleArn string

(Elasticsearch and Prometheus) Specifies the ARN of an IAM role to assume.

sigv4Auth boolean

(Elasticsearch and Prometheus) Enable usage of SigV4.

sigv4AuthType string

(Elasticsearch and Prometheus) The Sigv4 authentication provider to use: 'default', 'credentials' or 'keys' (AMG: 'workspace-iam-role').

sigv4ExternalId string

(Elasticsearch and Prometheus) When assuming a role in another account use this external ID.

sigv4Profile string

(Elasticsearch and Prometheus) Credentials profile name, leave blank for default.

sigv4Region string

(Elasticsearch and Prometheus) AWS region to use for Sigv4.

sslMode string

(PostgreSQL) SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full'.

subscriptionId string

(Azure Monitor) The subscription id

tenantId string

(Azure Monitor) Service account tenant ID.

timeField string

(Elasticsearch) Which field that should be used as timestamp.

timeInterval string

(Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL, and MSSQL) Lowest interval/step value that should be used for this data source. Sometimes called "Scrape Interval" in the Grafana UI.

timescaledb boolean

(PostgreSQL) Enable usage of TimescaleDB extension.

tlsAuth boolean

(All) Enable TLS authentication using client cert configured in secure json data.

tlsAuthWithCaCert boolean

(All) Enable TLS authentication using CA cert.

tlsConfigurationMethod string

(All) SSL Certificate configuration, either by ‘file-path’ or ‘file-content’.

tlsSkipVerify boolean

(All) Controls whether a client verifies the server’s certificate chain and host name.

tokenUri string

(Stackdriver) The token URI used, provided in the service account key.

tracingDatasourceUid string

(Cloudwatch) The X-Ray datasource uid to associate to this Cloudwatch datasource.

tsdbResolution number

(OpenTSDB) Resolution.

tsdbVersion number

(OpenTSDB) Version.

version string

(InfluxDB) InfluxQL or Flux.

workgroup string

(Athena) Workgroup to use.

xpackEnabled boolean

(Elasticsearch) Enable X-Pack support.

assume_role_arn str

(CloudWatch, Athena) The ARN of the role to be assumed by Grafana when using the CloudWatch or Athena data source.

auth_type str

(CloudWatch, Athena) The authentication type used to access the data source.

authentication_type str

(Stackdriver) The authentication type: jwt or gce.

catalog str

(Athena) Athena catalog.

client_email str

(Stackdriver) Service account email address.

client_id str

(Azure Monitor) The service account client id.

cloud_name str

(Azure Monitor) The cloud name.

conn_max_lifetime int

(MySQL, PostgreSQL, and MSSQL) Maximum amount of time in seconds a connection may be reused (Grafana v5.4+).

custom_metrics_namespaces str

(CloudWatch) A comma-separated list of custom namespaces to be queried by the CloudWatch data source.

database str

(Athena) Name of the database within the catalog.

default_bucket str

(InfluxDB) The default bucket for the data source.

default_project str

(Stackdriver) The default project for the data source.

default_region str

(CloudWatch, Athena) The default region for the data source.

derived_fields Sequence[DataSourceJsonDataDerivedField]

(Loki) See https://grafana.com/docs/grafana/latest/datasources/loki/#derived-fields

encrypt str

(MSSQL) Connection SSL encryption handling: 'disable', 'false' or 'true'.

es_version str

(Elasticsearch) Elasticsearch semantic version (Grafana v8.0+).

external_id str

(CloudWatch, Athena) If you are assuming a role in another account, that has been created with an external ID, specify the external ID here.

github_url str

(Github) Github URL

graphite_version str

(Graphite) Graphite version.

http_method str

(Prometheus) HTTP method to use for making requests.

implementation str

(Alertmanager) Implementation of Alertmanager. Either 'cortex' or 'prometheus'

interval str

(Elasticsearch) Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly'.

log_level_field str

(Elasticsearch) Which field should be used to indicate the priority of the log message.

log_message_field str

(Elasticsearch) Which field should be used as the log message.

manage_alerts bool

(Prometheus) Manage alerts.

max_concurrent_shard_requests int

(Elasticsearch) Maximum number of concurrent shard requests.

max_idle_conns int

(MySQL, PostgreSQL and MSSQL) Maximum number of connections in the idle connection pool (Grafana v5.4+).

max_lines int

(Loki) Upper limit for the number of log lines returned by Loki

max_open_conns int

(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).

org_slug str

(Sentry) Organization slug.

organization str

(InfluxDB) An organization is a workspace for a group of users. All dashboards, tasks, buckets, members, etc., belong to an organization.

output_location str

(Athena) AWS S3 bucket to store execution outputs. If not specified, the default query result location from the Workgroup configuration will be used.

postgres_version int

(PostgreSQL) Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, etc.

profile str

(CloudWatch, Athena) The credentials profile name to use when authentication type is set as 'Credentials file'.

query_timeout str

(Prometheus) Timeout for queries made to the Prometheus data source in seconds.

sigv4_assume_role_arn str

(Elasticsearch and Prometheus) Specifies the ARN of an IAM role to assume.

sigv4_auth bool

(Elasticsearch and Prometheus) Enable usage of SigV4.

sigv4_auth_type str

(Elasticsearch and Prometheus) The Sigv4 authentication provider to use: 'default', 'credentials' or 'keys' (AMG: 'workspace-iam-role').

sigv4_external_id str

(Elasticsearch and Prometheus) When assuming a role in another account use this external ID.

sigv4_profile str

(Elasticsearch and Prometheus) Credentials profile name, leave blank for default.

sigv4_region str

(Elasticsearch and Prometheus) AWS region to use for Sigv4.

ssl_mode str

(PostgreSQL) SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full'.

subscription_id str

(Azure Monitor) The subscription id

tenant_id str

(Azure Monitor) Service account tenant ID.

time_field str

(Elasticsearch) Which field that should be used as timestamp.

time_interval str

(Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL, and MSSQL) Lowest interval/step value that should be used for this data source. Sometimes called "Scrape Interval" in the Grafana UI.

timescaledb bool

(PostgreSQL) Enable usage of TimescaleDB extension.

tls_auth bool

(All) Enable TLS authentication using client cert configured in secure json data.

tls_auth_with_ca_cert bool

(All) Enable TLS authentication using CA cert.

tls_configuration_method str

(All) SSL Certificate configuration, either by ‘file-path’ or ‘file-content’.

tls_skip_verify bool

(All) Controls whether a client verifies the server’s certificate chain and host name.

token_uri str

(Stackdriver) The token URI used, provided in the service account key.

tracing_datasource_uid str

(Cloudwatch) The X-Ray datasource uid to associate to this Cloudwatch datasource.

tsdb_resolution int

(OpenTSDB) Resolution.

tsdb_version int

(OpenTSDB) Version.

version str

(InfluxDB) InfluxQL or Flux.

workgroup str

(Athena) Workgroup to use.

xpack_enabled bool

(Elasticsearch) Enable X-Pack support.

assumeRoleArn String

(CloudWatch, Athena) The ARN of the role to be assumed by Grafana when using the CloudWatch or Athena data source.

authType String

(CloudWatch, Athena) The authentication type used to access the data source.

authenticationType String

(Stackdriver) The authentication type: jwt or gce.

catalog String

(Athena) Athena catalog.

clientEmail String

(Stackdriver) Service account email address.

clientId String

(Azure Monitor) The service account client id.

cloudName String

(Azure Monitor) The cloud name.

connMaxLifetime Number

(MySQL, PostgreSQL, and MSSQL) Maximum amount of time in seconds a connection may be reused (Grafana v5.4+).

customMetricsNamespaces String

(CloudWatch) A comma-separated list of custom namespaces to be queried by the CloudWatch data source.

database String

(Athena) Name of the database within the catalog.

defaultBucket String

(InfluxDB) The default bucket for the data source.

defaultProject String

(Stackdriver) The default project for the data source.

defaultRegion String

(CloudWatch, Athena) The default region for the data source.

derivedFields List<Property Map>

(Loki) See https://grafana.com/docs/grafana/latest/datasources/loki/#derived-fields

encrypt String

(MSSQL) Connection SSL encryption handling: 'disable', 'false' or 'true'.

esVersion String

(Elasticsearch) Elasticsearch semantic version (Grafana v8.0+).

externalId String

(CloudWatch, Athena) If you are assuming a role in another account, that has been created with an external ID, specify the external ID here.

githubUrl String

(Github) Github URL

graphiteVersion String

(Graphite) Graphite version.

httpMethod String

(Prometheus) HTTP method to use for making requests.

implementation String

(Alertmanager) Implementation of Alertmanager. Either 'cortex' or 'prometheus'

interval String

(Elasticsearch) Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly'.

logLevelField String

(Elasticsearch) Which field should be used to indicate the priority of the log message.

logMessageField String

(Elasticsearch) Which field should be used as the log message.

manageAlerts Boolean

(Prometheus) Manage alerts.

maxConcurrentShardRequests Number

(Elasticsearch) Maximum number of concurrent shard requests.

maxIdleConns Number

(MySQL, PostgreSQL and MSSQL) Maximum number of connections in the idle connection pool (Grafana v5.4+).

maxLines Number

(Loki) Upper limit for the number of log lines returned by Loki

maxOpenConns Number

(MySQL, PostgreSQL and MSSQL) Maximum number of open connections to the database (Grafana v5.4+).

orgSlug String

(Sentry) Organization slug.

organization String

(InfluxDB) An organization is a workspace for a group of users. All dashboards, tasks, buckets, members, etc., belong to an organization.

outputLocation String

(Athena) AWS S3 bucket to store execution outputs. If not specified, the default query result location from the Workgroup configuration will be used.

postgresVersion Number

(PostgreSQL) Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, etc.

profile String

(CloudWatch, Athena) The credentials profile name to use when authentication type is set as 'Credentials file'.

queryTimeout String

(Prometheus) Timeout for queries made to the Prometheus data source in seconds.

sigv4AssumeRoleArn String

(Elasticsearch and Prometheus) Specifies the ARN of an IAM role to assume.

sigv4Auth Boolean

(Elasticsearch and Prometheus) Enable usage of SigV4.

sigv4AuthType String

(Elasticsearch and Prometheus) The Sigv4 authentication provider to use: 'default', 'credentials' or 'keys' (AMG: 'workspace-iam-role').

sigv4ExternalId String

(Elasticsearch and Prometheus) When assuming a role in another account use this external ID.

sigv4Profile String

(Elasticsearch and Prometheus) Credentials profile name, leave blank for default.

sigv4Region String

(Elasticsearch and Prometheus) AWS region to use for Sigv4.

sslMode String

(PostgreSQL) SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full'.

subscriptionId String

(Azure Monitor) The subscription id

tenantId String

(Azure Monitor) Service account tenant ID.

timeField String

(Elasticsearch) Which field that should be used as timestamp.

timeInterval String

(Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL, and MSSQL) Lowest interval/step value that should be used for this data source. Sometimes called "Scrape Interval" in the Grafana UI.

timescaledb Boolean

(PostgreSQL) Enable usage of TimescaleDB extension.

tlsAuth Boolean

(All) Enable TLS authentication using client cert configured in secure json data.

tlsAuthWithCaCert Boolean

(All) Enable TLS authentication using CA cert.

tlsConfigurationMethod String

(All) SSL Certificate configuration, either by ‘file-path’ or ‘file-content’.

tlsSkipVerify Boolean

(All) Controls whether a client verifies the server’s certificate chain and host name.

tokenUri String

(Stackdriver) The token URI used, provided in the service account key.

tracingDatasourceUid String

(Cloudwatch) The X-Ray datasource uid to associate to this Cloudwatch datasource.

tsdbResolution Number

(OpenTSDB) Resolution.

tsdbVersion Number

(OpenTSDB) Version.

version String

(InfluxDB) InfluxQL or Flux.

workgroup String

(Athena) Workgroup to use.

xpackEnabled Boolean

(Elasticsearch) Enable X-Pack support.

DataSourceJsonDataDerivedField

DatasourceUid string
MatcherRegex string
Name string

A unique name for the data source.

Url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

DatasourceUid string
MatcherRegex string
Name string

A unique name for the data source.

Url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

datasourceUid String
matcherRegex String
name String

A unique name for the data source.

url String

The URL for the data source. The type of URL required varies depending on the chosen data source type.

datasourceUid string
matcherRegex string
name string

A unique name for the data source.

url string

The URL for the data source. The type of URL required varies depending on the chosen data source type.

datasource_uid str
matcher_regex str
name str

A unique name for the data source.

url str

The URL for the data source. The type of URL required varies depending on the chosen data source type.

datasourceUid String
matcherRegex String
name String

A unique name for the data source.

url String

The URL for the data source. The type of URL required varies depending on the chosen data source type.

DataSourceSecureJsonData

AccessKey string

(CloudWatch, Athena) The access key used to access the data source.

AccessToken string

(Github) The access token used to access the data source.

AuthToken string

(Sentry) Authorization token.

BasicAuthPassword string

(All) Password to use for basic authentication.

ClientSecret string

(Azure Monitor) Client secret for authentication.

Password string

(All) Password to use for authentication.

PrivateKey string

(Stackdriver) The service account key private_key to use to access the data source.

SecretKey string

(CloudWatch, Athena) The secret key to use to access the data source.

Sigv4AccessKey string

(Elasticsearch and Prometheus) SigV4 access key. Required when using 'keys' auth provider.

Sigv4SecretKey string

(Elasticsearch and Prometheus) SigV4 secret key. Required when using 'keys' auth provider.

TlsCaCert string

(All) CA cert for out going requests.

TlsClientCert string

(All) TLS Client cert for outgoing requests.

TlsClientKey string

(All) TLS Client key for outgoing requests.

AccessKey string

(CloudWatch, Athena) The access key used to access the data source.

AccessToken string

(Github) The access token used to access the data source.

AuthToken string

(Sentry) Authorization token.

BasicAuthPassword string

(All) Password to use for basic authentication.

ClientSecret string

(Azure Monitor) Client secret for authentication.

Password string

(All) Password to use for authentication.

PrivateKey string

(Stackdriver) The service account key private_key to use to access the data source.

SecretKey string

(CloudWatch, Athena) The secret key to use to access the data source.

Sigv4AccessKey string

(Elasticsearch and Prometheus) SigV4 access key. Required when using 'keys' auth provider.

Sigv4SecretKey string

(Elasticsearch and Prometheus) SigV4 secret key. Required when using 'keys' auth provider.

TlsCaCert string

(All) CA cert for out going requests.

TlsClientCert string

(All) TLS Client cert for outgoing requests.

TlsClientKey string

(All) TLS Client key for outgoing requests.

accessKey String

(CloudWatch, Athena) The access key used to access the data source.

accessToken String

(Github) The access token used to access the data source.

authToken String

(Sentry) Authorization token.

basicAuthPassword String

(All) Password to use for basic authentication.

clientSecret String

(Azure Monitor) Client secret for authentication.

password String

(All) Password to use for authentication.

privateKey String

(Stackdriver) The service account key private_key to use to access the data source.

secretKey String

(CloudWatch, Athena) The secret key to use to access the data source.

sigv4AccessKey String

(Elasticsearch and Prometheus) SigV4 access key. Required when using 'keys' auth provider.

sigv4SecretKey String

(Elasticsearch and Prometheus) SigV4 secret key. Required when using 'keys' auth provider.

tlsCaCert String

(All) CA cert for out going requests.

tlsClientCert String

(All) TLS Client cert for outgoing requests.

tlsClientKey String

(All) TLS Client key for outgoing requests.

accessKey string

(CloudWatch, Athena) The access key used to access the data source.

accessToken string

(Github) The access token used to access the data source.

authToken string

(Sentry) Authorization token.

basicAuthPassword string

(All) Password to use for basic authentication.

clientSecret string

(Azure Monitor) Client secret for authentication.

password string

(All) Password to use for authentication.

privateKey string

(Stackdriver) The service account key private_key to use to access the data source.

secretKey string

(CloudWatch, Athena) The secret key to use to access the data source.

sigv4AccessKey string

(Elasticsearch and Prometheus) SigV4 access key. Required when using 'keys' auth provider.

sigv4SecretKey string

(Elasticsearch and Prometheus) SigV4 secret key. Required when using 'keys' auth provider.

tlsCaCert string

(All) CA cert for out going requests.

tlsClientCert string

(All) TLS Client cert for outgoing requests.

tlsClientKey string

(All) TLS Client key for outgoing requests.

access_key str

(CloudWatch, Athena) The access key used to access the data source.

access_token str

(Github) The access token used to access the data source.

auth_token str

(Sentry) Authorization token.

basic_auth_password str

(All) Password to use for basic authentication.

client_secret str

(Azure Monitor) Client secret for authentication.

password str

(All) Password to use for authentication.

private_key str

(Stackdriver) The service account key private_key to use to access the data source.

secret_key str

(CloudWatch, Athena) The secret key to use to access the data source.

sigv4_access_key str

(Elasticsearch and Prometheus) SigV4 access key. Required when using 'keys' auth provider.

sigv4_secret_key str

(Elasticsearch and Prometheus) SigV4 secret key. Required when using 'keys' auth provider.

tls_ca_cert str

(All) CA cert for out going requests.

tls_client_cert str

(All) TLS Client cert for outgoing requests.

tls_client_key str

(All) TLS Client key for outgoing requests.

accessKey String

(CloudWatch, Athena) The access key used to access the data source.

accessToken String

(Github) The access token used to access the data source.

authToken String

(Sentry) Authorization token.

basicAuthPassword String

(All) Password to use for basic authentication.

clientSecret String

(Azure Monitor) Client secret for authentication.

password String

(All) Password to use for authentication.

privateKey String

(Stackdriver) The service account key private_key to use to access the data source.

secretKey String

(CloudWatch, Athena) The secret key to use to access the data source.

sigv4AccessKey String

(Elasticsearch and Prometheus) SigV4 access key. Required when using 'keys' auth provider.

sigv4SecretKey String

(Elasticsearch and Prometheus) SigV4 secret key. Required when using 'keys' auth provider.

tlsCaCert String

(All) CA cert for out going requests.

tlsClientCert String

(All) TLS Client cert for outgoing requests.

tlsClientKey String

(All) TLS Client key for outgoing requests.

Import

 $ pulumi import grafana:index/dataSource:DataSource by_integer_id {{datasource id}}
 $ pulumi import grafana:index/dataSource:DataSource by_uid {{datasource uid}}

Package Details

Repository
https://github.com/lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.