1. Packages
  2. Grafana Cloud
  3. API Docs
  4. cloud
  5. PrivateDataSourceConnectNetwork
Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse

grafana.cloud.PrivateDataSourceConnectNetwork

Explore with Pulumi AI

Required access policy scopes:

  • accesspolicies:read
  • accesspolicies:write
  • accesspolicies:delete

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";
import * as grafana from "@pulumiverse/grafana";

const current = grafana.cloud.getStack({
    slug: "<your slug>",
});
const test = new grafana.cloud.PrivateDataSourceConnectNetwork("test", {
    region: "prod-us-east-0",
    name: "my-pdc",
    displayName: "My PDC",
    stackIdentifier: current.then(current => current.id),
});
const testPrivateDataSourceConnectNetworkToken = new grafana.cloud.PrivateDataSourceConnectNetworkToken("test", {
    pdcNetworkId: test.pdcNetworkId,
    region: test.region,
    name: "my-pdc-token",
    displayName: "My PDC Token",
});
Copy
import pulumi
import pulumi_grafana as grafana
import pulumiverse_grafana as grafana

current = grafana.cloud.get_stack(slug="<your slug>")
test = grafana.cloud.PrivateDataSourceConnectNetwork("test",
    region="prod-us-east-0",
    name="my-pdc",
    display_name="My PDC",
    stack_identifier=current.id)
test_private_data_source_connect_network_token = grafana.cloud.PrivateDataSourceConnectNetworkToken("test",
    pdc_network_id=test.pdc_network_id,
    region=test.region,
    name="my-pdc-token",
    display_name="My PDC Token")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/cloud"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := cloud.LookupStack(ctx, &cloud.LookupStackArgs{
			Slug: "<your slug>",
		}, nil)
		if err != nil {
			return err
		}
		test, err := cloud.NewPrivateDataSourceConnectNetwork(ctx, "test", &cloud.PrivateDataSourceConnectNetworkArgs{
			Region:          pulumi.String("prod-us-east-0"),
			Name:            pulumi.String("my-pdc"),
			DisplayName:     pulumi.String("My PDC"),
			StackIdentifier: pulumi.String(current.Id),
		})
		if err != nil {
			return err
		}
		_, err = cloud.NewPrivateDataSourceConnectNetworkToken(ctx, "test", &cloud.PrivateDataSourceConnectNetworkTokenArgs{
			PdcNetworkId: test.PdcNetworkId,
			Region:       test.Region,
			Name:         pulumi.String("my-pdc-token"),
			DisplayName:  pulumi.String("My PDC Token"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;
using Grafana = Pulumiverse.Grafana;

return await Deployment.RunAsync(() => 
{
    var current = Grafana.Cloud.GetStack.Invoke(new()
    {
        Slug = "<your slug>",
    });

    var test = new Grafana.Cloud.PrivateDataSourceConnectNetwork("test", new()
    {
        Region = "prod-us-east-0",
        Name = "my-pdc",
        DisplayName = "My PDC",
        StackIdentifier = current.Apply(getStackResult => getStackResult.Id),
    });

    var testPrivateDataSourceConnectNetworkToken = new Grafana.Cloud.PrivateDataSourceConnectNetworkToken("test", new()
    {
        PdcNetworkId = test.PdcNetworkId,
        Region = test.Region,
        Name = "my-pdc-token",
        DisplayName = "My PDC Token",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.cloud.CloudFunctions;
import com.pulumi.grafana.cloud.inputs.GetStackArgs;
import com.pulumi.grafana.cloud.PrivateDataSourceConnectNetwork;
import com.pulumi.grafana.cloud.PrivateDataSourceConnectNetworkArgs;
import com.pulumi.grafana.cloud.PrivateDataSourceConnectNetworkToken;
import com.pulumi.grafana.cloud.PrivateDataSourceConnectNetworkTokenArgs;
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) {
        final var current = CloudFunctions.getStack(GetStackArgs.builder()
            .slug("<your slug>")
            .build());

        var test = new PrivateDataSourceConnectNetwork("test", PrivateDataSourceConnectNetworkArgs.builder()
            .region("prod-us-east-0")
            .name("my-pdc")
            .displayName("My PDC")
            .stackIdentifier(current.applyValue(getStackResult -> getStackResult.id()))
            .build());

        var testPrivateDataSourceConnectNetworkToken = new PrivateDataSourceConnectNetworkToken("testPrivateDataSourceConnectNetworkToken", PrivateDataSourceConnectNetworkTokenArgs.builder()
            .pdcNetworkId(test.pdcNetworkId())
            .region(test.region())
            .name("my-pdc-token")
            .displayName("My PDC Token")
            .build());

    }
}
Copy
resources:
  test:
    type: grafana:cloud:PrivateDataSourceConnectNetwork
    properties:
      region: prod-us-east-0
      name: my-pdc
      displayName: My PDC
      stackIdentifier: ${current.id}
  testPrivateDataSourceConnectNetworkToken:
    type: grafana:cloud:PrivateDataSourceConnectNetworkToken
    name: test
    properties:
      pdcNetworkId: ${test.pdcNetworkId}
      region: ${test.region}
      name: my-pdc-token
      displayName: My PDC Token
variables:
  current:
    fn::invoke:
      function: grafana:cloud:getStack
      arguments:
        slug: <your slug>
Copy

Create PrivateDataSourceConnectNetwork Resource

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

Constructor syntax

new PrivateDataSourceConnectNetwork(name: string, args: PrivateDataSourceConnectNetworkArgs, opts?: CustomResourceOptions);
@overload
def PrivateDataSourceConnectNetwork(resource_name: str,
                                    args: PrivateDataSourceConnectNetworkArgs,
                                    opts: Optional[ResourceOptions] = None)

@overload
def PrivateDataSourceConnectNetwork(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    region: Optional[str] = None,
                                    stack_identifier: Optional[str] = None,
                                    display_name: Optional[str] = None,
                                    name: Optional[str] = None)
func NewPrivateDataSourceConnectNetwork(ctx *Context, name string, args PrivateDataSourceConnectNetworkArgs, opts ...ResourceOption) (*PrivateDataSourceConnectNetwork, error)
public PrivateDataSourceConnectNetwork(string name, PrivateDataSourceConnectNetworkArgs args, CustomResourceOptions? opts = null)
public PrivateDataSourceConnectNetwork(String name, PrivateDataSourceConnectNetworkArgs args)
public PrivateDataSourceConnectNetwork(String name, PrivateDataSourceConnectNetworkArgs args, CustomResourceOptions options)
type: grafana:cloud:PrivateDataSourceConnectNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PrivateDataSourceConnectNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PrivateDataSourceConnectNetworkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateDataSourceConnectNetworkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateDataSourceConnectNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PrivateDataSourceConnectNetworkArgs
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 privateDataSourceConnectNetworkResource = new Grafana.Cloud.PrivateDataSourceConnectNetwork("privateDataSourceConnectNetworkResource", new()
{
    Region = "string",
    StackIdentifier = "string",
    DisplayName = "string",
    Name = "string",
});
Copy
example, err := cloud.NewPrivateDataSourceConnectNetwork(ctx, "privateDataSourceConnectNetworkResource", &cloud.PrivateDataSourceConnectNetworkArgs{
	Region:          pulumi.String("string"),
	StackIdentifier: pulumi.String("string"),
	DisplayName:     pulumi.String("string"),
	Name:            pulumi.String("string"),
})
Copy
var privateDataSourceConnectNetworkResource = new PrivateDataSourceConnectNetwork("privateDataSourceConnectNetworkResource", PrivateDataSourceConnectNetworkArgs.builder()
    .region("string")
    .stackIdentifier("string")
    .displayName("string")
    .name("string")
    .build());
Copy
private_data_source_connect_network_resource = grafana.cloud.PrivateDataSourceConnectNetwork("privateDataSourceConnectNetworkResource",
    region="string",
    stack_identifier="string",
    display_name="string",
    name="string")
Copy
const privateDataSourceConnectNetworkResource = new grafana.cloud.PrivateDataSourceConnectNetwork("privateDataSourceConnectNetworkResource", {
    region: "string",
    stackIdentifier: "string",
    displayName: "string",
    name: "string",
});
Copy
type: grafana:cloud:PrivateDataSourceConnectNetwork
properties:
    displayName: string
    name: string
    region: string
    stackIdentifier: string
Copy

PrivateDataSourceConnectNetwork Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PrivateDataSourceConnectNetwork resource accepts the following input properties:

Region
This property is required.
Changes to this property will trigger replacement.
string
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
StackIdentifier This property is required. string
The identifier of the stack.
DisplayName string
Display name of the PDC network. Defaults to the name.
Name Changes to this property will trigger replacement. string
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
Region
This property is required.
Changes to this property will trigger replacement.
string
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
StackIdentifier This property is required. string
The identifier of the stack.
DisplayName string
Display name of the PDC network. Defaults to the name.
Name Changes to this property will trigger replacement. string
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
region
This property is required.
Changes to this property will trigger replacement.
String
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stackIdentifier This property is required. String
The identifier of the stack.
displayName String
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. String
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
region
This property is required.
Changes to this property will trigger replacement.
string
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stackIdentifier This property is required. string
The identifier of the stack.
displayName string
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. string
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
region
This property is required.
Changes to this property will trigger replacement.
str
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stack_identifier This property is required. str
The identifier of the stack.
display_name str
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. str
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
region
This property is required.
Changes to this property will trigger replacement.
String
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stackIdentifier This property is required. String
The identifier of the stack.
displayName String
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. String
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body

Outputs

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

CreatedAt string
Creation date of the private data source connect network.
Id string
The provider-assigned unique ID for this managed resource.
PdcNetworkId string
ID of the private data source connect network.
UpdatedAt string
Last update date of the private data source connect network.
CreatedAt string
Creation date of the private data source connect network.
Id string
The provider-assigned unique ID for this managed resource.
PdcNetworkId string
ID of the private data source connect network.
UpdatedAt string
Last update date of the private data source connect network.
createdAt String
Creation date of the private data source connect network.
id String
The provider-assigned unique ID for this managed resource.
pdcNetworkId String
ID of the private data source connect network.
updatedAt String
Last update date of the private data source connect network.
createdAt string
Creation date of the private data source connect network.
id string
The provider-assigned unique ID for this managed resource.
pdcNetworkId string
ID of the private data source connect network.
updatedAt string
Last update date of the private data source connect network.
created_at str
Creation date of the private data source connect network.
id str
The provider-assigned unique ID for this managed resource.
pdc_network_id str
ID of the private data source connect network.
updated_at str
Last update date of the private data source connect network.
createdAt String
Creation date of the private data source connect network.
id String
The provider-assigned unique ID for this managed resource.
pdcNetworkId String
ID of the private data source connect network.
updatedAt String
Last update date of the private data source connect network.

Look up Existing PrivateDataSourceConnectNetwork Resource

Get an existing PrivateDataSourceConnectNetwork 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?: PrivateDataSourceConnectNetworkState, opts?: CustomResourceOptions): PrivateDataSourceConnectNetwork
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        display_name: Optional[str] = None,
        name: Optional[str] = None,
        pdc_network_id: Optional[str] = None,
        region: Optional[str] = None,
        stack_identifier: Optional[str] = None,
        updated_at: Optional[str] = None) -> PrivateDataSourceConnectNetwork
func GetPrivateDataSourceConnectNetwork(ctx *Context, name string, id IDInput, state *PrivateDataSourceConnectNetworkState, opts ...ResourceOption) (*PrivateDataSourceConnectNetwork, error)
public static PrivateDataSourceConnectNetwork Get(string name, Input<string> id, PrivateDataSourceConnectNetworkState? state, CustomResourceOptions? opts = null)
public static PrivateDataSourceConnectNetwork get(String name, Output<String> id, PrivateDataSourceConnectNetworkState state, CustomResourceOptions options)
resources:  _:    type: grafana:cloud:PrivateDataSourceConnectNetwork    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CreatedAt string
Creation date of the private data source connect network.
DisplayName string
Display name of the PDC network. Defaults to the name.
Name Changes to this property will trigger replacement. string
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
PdcNetworkId string
ID of the private data source connect network.
Region Changes to this property will trigger replacement. string
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
StackIdentifier string
The identifier of the stack.
UpdatedAt string
Last update date of the private data source connect network.
CreatedAt string
Creation date of the private data source connect network.
DisplayName string
Display name of the PDC network. Defaults to the name.
Name Changes to this property will trigger replacement. string
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
PdcNetworkId string
ID of the private data source connect network.
Region Changes to this property will trigger replacement. string
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
StackIdentifier string
The identifier of the stack.
UpdatedAt string
Last update date of the private data source connect network.
createdAt String
Creation date of the private data source connect network.
displayName String
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. String
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
pdcNetworkId String
ID of the private data source connect network.
region Changes to this property will trigger replacement. String
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stackIdentifier String
The identifier of the stack.
updatedAt String
Last update date of the private data source connect network.
createdAt string
Creation date of the private data source connect network.
displayName string
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. string
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
pdcNetworkId string
ID of the private data source connect network.
region Changes to this property will trigger replacement. string
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stackIdentifier string
The identifier of the stack.
updatedAt string
Last update date of the private data source connect network.
created_at str
Creation date of the private data source connect network.
display_name str
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. str
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
pdc_network_id str
ID of the private data source connect network.
region Changes to this property will trigger replacement. str
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stack_identifier str
The identifier of the stack.
updated_at str
Last update date of the private data source connect network.
createdAt String
Creation date of the private data source connect network.
displayName String
Display name of the PDC network. Defaults to the name.
name Changes to this property will trigger replacement. String
Name of the PDC network.Note: The name must be lowercase and can contain hyphens or underscores. See full requirements here: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#request-body
pdcNetworkId String
ID of the private data source connect network.
region Changes to this property will trigger replacement. String
The region where your stack is deployed. Use the instances list API to get the region for your instance - use the regionSlug property: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-stacks
stackIdentifier String
The identifier of the stack.
updatedAt String
Last update date of the private data source connect network.

Import

$ pulumi import grafana:cloud/privateDataSourceConnectNetwork:PrivateDataSourceConnectNetwork name "{{ region }}:{{ policyId }}"
Copy

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.