1. Packages
  2. Grafana Cloud
  3. API Docs
  4. DataSourceConfig
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

grafana.DataSourceConfig

Explore with Pulumi AI

grafana logo
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

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

    Use this resource for configuring multiple datasources, when that configuration (json_data_encoded field) requires circular references like in the example below.

    When using the grafana.DataSourceConfig resource, the corresponding grafana.DataSource resources must have the json_data_encoded and http_headers fields ignored. Otherwise, an infinite update loop will occur. See the example below.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const lokiDataSource = new grafana.DataSource("lokiDataSource", {
        type: "loki",
        url: "http://localhost:3100",
    });
    const tempoDataSource = new grafana.DataSource("tempoDataSource", {
        type: "tempo",
        url: "http://localhost:3200",
    });
    const lokiDataSourceConfig = new grafana.DataSourceConfig("lokiDataSourceConfig", {
        uid: lokiDataSource.uid,
        jsonDataEncoded: pulumi.jsonStringify({
            derivedFields: [{
                datasourceUid: tempoDataSource.uid,
                matcherRegex: "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)",
                matcherType: "regex",
                name: "traceID",
                url: "${__value.raw}",
            }],
        }),
    });
    const tempoDataSourceConfig = new grafana.DataSourceConfig("tempoDataSourceConfig", {
        uid: tempoDataSource.uid,
        jsonDataEncoded: pulumi.jsonStringify({
            tracesToLogsV2: {
                customQuery: true,
                datasourceUid: lokiDataSource.uid,
                filterBySpanID: false,
                filterByTraceID: false,
                query: "|=\"${__trace.traceId}\" | json",
            },
        }),
    });
    
    import pulumi
    import json
    import pulumiverse_grafana as grafana
    
    loki_data_source = grafana.DataSource("lokiDataSource",
        type="loki",
        url="http://localhost:3100")
    tempo_data_source = grafana.DataSource("tempoDataSource",
        type="tempo",
        url="http://localhost:3200")
    loki_data_source_config = grafana.DataSourceConfig("lokiDataSourceConfig",
        uid=loki_data_source.uid,
        json_data_encoded=pulumi.Output.json_dumps({
            "derivedFields": [{
                "datasourceUid": tempo_data_source.uid,
                "matcherRegex": "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)",
                "matcherType": "regex",
                "name": "traceID",
                "url": "${__value.raw}",
            }],
        }))
    tempo_data_source_config = grafana.DataSourceConfig("tempoDataSourceConfig",
        uid=tempo_data_source.uid,
        json_data_encoded=pulumi.Output.json_dumps({
            "tracesToLogsV2": {
                "customQuery": True,
                "datasourceUid": loki_data_source.uid,
                "filterBySpanID": False,
                "filterByTraceID": False,
                "query": "|=\"${__trace.traceId}\" | json",
            },
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		lokiDataSource, err := grafana.NewDataSource(ctx, "lokiDataSource", &grafana.DataSourceArgs{
    			Type: pulumi.String("loki"),
    			Url:  pulumi.String("http://localhost:3100"),
    		})
    		if err != nil {
    			return err
    		}
    		tempoDataSource, err := grafana.NewDataSource(ctx, "tempoDataSource", &grafana.DataSourceArgs{
    			Type: pulumi.String("tempo"),
    			Url:  pulumi.String("http://localhost:3200"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = grafana.NewDataSourceConfig(ctx, "lokiDataSourceConfig", &grafana.DataSourceConfigArgs{
    			Uid: lokiDataSource.Uid,
    			JsonDataEncoded: tempoDataSource.Uid.ApplyT(func(uid string) (pulumi.String, error) {
    				var _zero pulumi.String
    				tmpJSON0, err := json.Marshal(map[string]interface{}{
    					"derivedFields": []map[string]interface{}{
    						map[string]interface{}{
    							"datasourceUid": uid,
    							"matcherRegex":  "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)",
    							"matcherType":   "regex",
    							"name":          "traceID",
    							"url":           "${__value.raw}",
    						},
    					},
    				})
    				if err != nil {
    					return _zero, err
    				}
    				json0 := string(tmpJSON0)
    				return pulumi.String(json0), nil
    			}).(pulumi.StringOutput),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = grafana.NewDataSourceConfig(ctx, "tempoDataSourceConfig", &grafana.DataSourceConfigArgs{
    			Uid: tempoDataSource.Uid,
    			JsonDataEncoded: lokiDataSource.Uid.ApplyT(func(uid string) (pulumi.String, error) {
    				var _zero pulumi.String
    				tmpJSON1, err := json.Marshal(map[string]interface{}{
    					"tracesToLogsV2": map[string]interface{}{
    						"customQuery":     true,
    						"datasourceUid":   uid,
    						"filterBySpanID":  false,
    						"filterByTraceID": false,
    						"query":           "|=\"${__trace.traceId}\" | json",
    					},
    				})
    				if err != nil {
    					return _zero, err
    				}
    				json1 := string(tmpJSON1)
    				return pulumi.String(json1), nil
    			}).(pulumi.StringOutput),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var lokiDataSource = new Grafana.DataSource("lokiDataSource", new()
        {
            Type = "loki",
            Url = "http://localhost:3100",
        });
    
        var tempoDataSource = new Grafana.DataSource("tempoDataSource", new()
        {
            Type = "tempo",
            Url = "http://localhost:3200",
        });
    
        var lokiDataSourceConfig = new Grafana.DataSourceConfig("lokiDataSourceConfig", new()
        {
            Uid = lokiDataSource.Uid,
            JsonDataEncoded = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
            {
                ["derivedFields"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["datasourceUid"] = tempoDataSource.Uid,
                        ["matcherRegex"] = "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)",
                        ["matcherType"] = "regex",
                        ["name"] = "traceID",
                        ["url"] = "${__value.raw}",
                    },
                },
            })),
        });
    
        var tempoDataSourceConfig = new Grafana.DataSourceConfig("tempoDataSourceConfig", new()
        {
            Uid = tempoDataSource.Uid,
            JsonDataEncoded = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
            {
                ["tracesToLogsV2"] = new Dictionary<string, object?>
                {
                    ["customQuery"] = true,
                    ["datasourceUid"] = lokiDataSource.Uid,
                    ["filterBySpanID"] = false,
                    ["filterByTraceID"] = false,
                    ["query"] = "|=\"${__trace.traceId}\" | json",
                },
            })),
        });
    
    });
    
    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.DataSourceConfig;
    import com.pulumi.grafana.DataSourceConfigArgs;
    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 lokiDataSource = new DataSource("lokiDataSource", DataSourceArgs.builder()        
                .type("loki")
                .url("http://localhost:3100")
                .build());
    
            var tempoDataSource = new DataSource("tempoDataSource", DataSourceArgs.builder()        
                .type("tempo")
                .url("http://localhost:3200")
                .build());
    
            var lokiDataSourceConfig = new DataSourceConfig("lokiDataSourceConfig", DataSourceConfigArgs.builder()        
                .uid(lokiDataSource.uid())
                .jsonDataEncoded(tempoDataSource.uid().applyValue(uid -> serializeJson(
                    jsonObject(
                        jsonProperty("derivedFields", jsonArray(jsonObject(
                            jsonProperty("datasourceUid", uid),
                            jsonProperty("matcherRegex", "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)"),
                            jsonProperty("matcherType", "regex"),
                            jsonProperty("name", "traceID"),
                            jsonProperty("url", "${__value.raw}")
                        )))
                    ))))
                .build());
    
            var tempoDataSourceConfig = new DataSourceConfig("tempoDataSourceConfig", DataSourceConfigArgs.builder()        
                .uid(tempoDataSource.uid())
                .jsonDataEncoded(lokiDataSource.uid().applyValue(uid -> serializeJson(
                    jsonObject(
                        jsonProperty("tracesToLogsV2", jsonObject(
                            jsonProperty("customQuery", true),
                            jsonProperty("datasourceUid", uid),
                            jsonProperty("filterBySpanID", false),
                            jsonProperty("filterByTraceID", false),
                            jsonProperty("query", "|=\"${__trace.traceId}\" | json")
                        ))
                    ))))
                .build());
    
        }
    }
    
    resources:
      lokiDataSource:
        type: grafana:DataSource
        properties:
          type: loki
          url: http://localhost:3100
      tempoDataSource:
        type: grafana:DataSource
        properties:
          type: tempo
          url: http://localhost:3200
      lokiDataSourceConfig:
        type: grafana:DataSourceConfig
        properties:
          uid: ${lokiDataSource.uid}
          jsonDataEncoded:
            fn::toJSON:
              derivedFields:
                - datasourceUid: ${tempoDataSource.uid}
                  matcherRegex: '[tT]race_?[iI][dD]"?[:=]"?(\w+)'
                  matcherType: regex
                  name: traceID
                  url: ${__value.raw}
      tempoDataSourceConfig:
        type: grafana:DataSourceConfig
        properties:
          uid: ${tempoDataSource.uid}
          jsonDataEncoded:
            fn::toJSON:
              tracesToLogsV2:
                customQuery: true
                datasourceUid: ${lokiDataSource.uid}
                filterBySpanID: false
                filterByTraceID: false
                query: '|="${__trace.traceId}" | json'
    

    Create DataSourceConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DataSourceConfig(name: string, args?: DataSourceConfigArgs, opts?: CustomResourceOptions);
    @overload
    def DataSourceConfig(resource_name: str,
                         args: Optional[DataSourceConfigArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataSourceConfig(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         http_headers: Optional[Mapping[str, str]] = None,
                         json_data_encoded: Optional[str] = None,
                         org_id: Optional[str] = None,
                         secure_json_data_encoded: Optional[str] = None,
                         uid: Optional[str] = None)
    func NewDataSourceConfig(ctx *Context, name string, args *DataSourceConfigArgs, opts ...ResourceOption) (*DataSourceConfig, error)
    public DataSourceConfig(string name, DataSourceConfigArgs? args = null, CustomResourceOptions? opts = null)
    public DataSourceConfig(String name, DataSourceConfigArgs args)
    public DataSourceConfig(String name, DataSourceConfigArgs args, CustomResourceOptions options)
    
    type: grafana:DataSourceConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DataSourceConfigArgs
    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 DataSourceConfigArgs
    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 DataSourceConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataSourceConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataSourceConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dataSourceConfigResource = new Grafana.DataSourceConfig("dataSourceConfigResource", new()
    {
        HttpHeaders = 
        {
            { "string", "string" },
        },
        JsonDataEncoded = "string",
        OrgId = "string",
        SecureJsonDataEncoded = "string",
        Uid = "string",
    });
    
    example, err := grafana.NewDataSourceConfig(ctx, "dataSourceConfigResource", &grafana.DataSourceConfigArgs{
    	HttpHeaders: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	JsonDataEncoded:       pulumi.String("string"),
    	OrgId:                 pulumi.String("string"),
    	SecureJsonDataEncoded: pulumi.String("string"),
    	Uid:                   pulumi.String("string"),
    })
    
    var dataSourceConfigResource = new DataSourceConfig("dataSourceConfigResource", DataSourceConfigArgs.builder()
        .httpHeaders(Map.of("string", "string"))
        .jsonDataEncoded("string")
        .orgId("string")
        .secureJsonDataEncoded("string")
        .uid("string")
        .build());
    
    data_source_config_resource = grafana.DataSourceConfig("dataSourceConfigResource",
        http_headers={
            "string": "string",
        },
        json_data_encoded="string",
        org_id="string",
        secure_json_data_encoded="string",
        uid="string")
    
    const dataSourceConfigResource = new grafana.DataSourceConfig("dataSourceConfigResource", {
        httpHeaders: {
            string: "string",
        },
        jsonDataEncoded: "string",
        orgId: "string",
        secureJsonDataEncoded: "string",
        uid: "string",
    });
    
    type: grafana:DataSourceConfig
    properties:
        httpHeaders:
            string: string
        jsonDataEncoded: string
        orgId: string
        secureJsonDataEncoded: string
        uid: string
    

    DataSourceConfig 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 DataSourceConfig resource accepts the following input properties:

    HttpHeaders Dictionary<string, string>
    Custom HTTP headers
    JsonDataEncoded string
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    SecureJsonDataEncoded string
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    Uid string
    Unique identifier. If unset, this will be automatically generated.
    HttpHeaders map[string]string
    Custom HTTP headers
    JsonDataEncoded string
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    SecureJsonDataEncoded string
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    Uid string
    Unique identifier. If unset, this will be automatically generated.
    httpHeaders Map<String,String>
    Custom HTTP headers
    jsonDataEncoded String
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secureJsonDataEncoded String
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid String
    Unique identifier. If unset, this will be automatically generated.
    httpHeaders {[key: string]: string}
    Custom HTTP headers
    jsonDataEncoded string
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secureJsonDataEncoded string
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid string
    Unique identifier. If unset, this will be automatically generated.
    http_headers Mapping[str, str]
    Custom HTTP headers
    json_data_encoded str
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secure_json_data_encoded str
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid str
    Unique identifier. If unset, this will be automatically generated.
    httpHeaders Map<String>
    Custom HTTP headers
    jsonDataEncoded String
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secureJsonDataEncoded String
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid String
    Unique identifier. If unset, this will be automatically generated.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DataSourceConfig 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 Existing DataSourceConfig Resource

    Get an existing DataSourceConfig 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?: DataSourceConfigState, opts?: CustomResourceOptions): DataSourceConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            http_headers: Optional[Mapping[str, str]] = None,
            json_data_encoded: Optional[str] = None,
            org_id: Optional[str] = None,
            secure_json_data_encoded: Optional[str] = None,
            uid: Optional[str] = None) -> DataSourceConfig
    func GetDataSourceConfig(ctx *Context, name string, id IDInput, state *DataSourceConfigState, opts ...ResourceOption) (*DataSourceConfig, error)
    public static DataSourceConfig Get(string name, Input<string> id, DataSourceConfigState? state, CustomResourceOptions? opts = null)
    public static DataSourceConfig get(String name, Output<String> id, DataSourceConfigState 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:
    HttpHeaders Dictionary<string, string>
    Custom HTTP headers
    JsonDataEncoded string
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    SecureJsonDataEncoded string
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    Uid string
    Unique identifier. If unset, this will be automatically generated.
    HttpHeaders map[string]string
    Custom HTTP headers
    JsonDataEncoded string
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    SecureJsonDataEncoded string
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    Uid string
    Unique identifier. If unset, this will be automatically generated.
    httpHeaders Map<String,String>
    Custom HTTP headers
    jsonDataEncoded String
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secureJsonDataEncoded String
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid String
    Unique identifier. If unset, this will be automatically generated.
    httpHeaders {[key: string]: string}
    Custom HTTP headers
    jsonDataEncoded string
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secureJsonDataEncoded string
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid string
    Unique identifier. If unset, this will be automatically generated.
    http_headers Mapping[str, str]
    Custom HTTP headers
    json_data_encoded str
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secure_json_data_encoded str
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid str
    Unique identifier. If unset, this will be automatically generated.
    httpHeaders Map<String>
    Custom HTTP headers
    jsonDataEncoded String
    Serialized JSON string containing the json data. 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. Note that keys in this map are usually camelCased.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secureJsonDataEncoded String
    Serialized JSON string containing the secure json data. 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. Note that keys in this map are usually camelCased.
    uid String
    Unique identifier. If unset, this will be automatically generated.

    Import

    $ pulumi import grafana:index/dataSourceConfig:DataSourceConfig name "{{ uid }}"
    
    $ pulumi import grafana:index/dataSourceConfig:DataSourceConfig name "{{ orgID }}:{{ uid }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse