1. Packages
  2. Scaleway
  3. API Docs
  4. observability
  5. Source
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.observability.Source

Explore with Pulumi AI

The scaleway.observability.Source resource allows you to create and manage data sources in Scaleway’s Cockpit.

Refer to Cockpit’s product documentation and API documentation for more information.

Example Usage

Create a data source

The following command allows you to create a metrics data source named my-data-source in a given Project.

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

const project = new scaleway.account.Project("project", {name: "test project data source"});
const main = new scaleway.observability.Source("main", {
    projectId: project.id,
    name: "my-data-source",
    type: "metrics",
    retentionDays: 6,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

project = scaleway.account.Project("project", name="test project data source")
main = scaleway.observability.Source("main",
    project_id=project.id,
    name="my-data-source",
    type="metrics",
    retention_days=6)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/account"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/observability"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := account.NewProject(ctx, "project", &account.ProjectArgs{
			Name: pulumi.String("test project data source"),
		})
		if err != nil {
			return err
		}
		_, err = observability.NewSource(ctx, "main", &observability.SourceArgs{
			ProjectId:     project.ID(),
			Name:          pulumi.String("my-data-source"),
			Type:          pulumi.String("metrics"),
			RetentionDays: pulumi.Int(6),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var project = new Scaleway.Account.Project("project", new()
    {
        Name = "test project data source",
    });

    var main = new Scaleway.Observability.Source("main", new()
    {
        ProjectId = project.Id,
        Name = "my-data-source",
        Type = "metrics",
        RetentionDays = 6,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.account.Project;
import com.pulumi.scaleway.account.ProjectArgs;
import com.pulumi.scaleway.observability.Source;
import com.pulumi.scaleway.observability.SourceArgs;
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 project = new Project("project", ProjectArgs.builder()
            .name("test project data source")
            .build());

        var main = new Source("main", SourceArgs.builder()
            .projectId(project.id())
            .name("my-data-source")
            .type("metrics")
            .retentionDays(6)
            .build());

    }
}
Copy
resources:
  project:
    type: scaleway:account:Project
    properties:
      name: test project data source
  main:
    type: scaleway:observability:Source
    properties:
      projectId: ${project.id}
      name: my-data-source
      type: metrics
      retentionDays: 6
Copy

Create Source Resource

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

Constructor syntax

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

@overload
def Source(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           retention_days: Optional[int] = None,
           name: Optional[str] = None,
           project_id: Optional[str] = None,
           region: Optional[str] = None,
           type: Optional[str] = None)
func NewSource(ctx *Context, name string, args SourceArgs, opts ...ResourceOption) (*Source, error)
public Source(string name, SourceArgs args, CustomResourceOptions? opts = null)
public Source(String name, SourceArgs args)
public Source(String name, SourceArgs args, CustomResourceOptions options)
type: scaleway:observability:Source
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. SourceArgs
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. SourceArgs
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. SourceArgs
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. SourceArgs
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. SourceArgs
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 sourceResource = new Scaleway.Observability.Source("sourceResource", new()
{
    RetentionDays = 0,
    Name = "string",
    ProjectId = "string",
    Region = "string",
    Type = "string",
});
Copy
example, err := observability.NewSource(ctx, "sourceResource", &observability.SourceArgs{
	RetentionDays: pulumi.Int(0),
	Name:          pulumi.String("string"),
	ProjectId:     pulumi.String("string"),
	Region:        pulumi.String("string"),
	Type:          pulumi.String("string"),
})
Copy
var sourceResource = new Source("sourceResource", SourceArgs.builder()
    .retentionDays(0)
    .name("string")
    .projectId("string")
    .region("string")
    .type("string")
    .build());
Copy
source_resource = scaleway.observability.Source("sourceResource",
    retention_days=0,
    name="string",
    project_id="string",
    region="string",
    type="string")
Copy
const sourceResource = new scaleway.observability.Source("sourceResource", {
    retentionDays: 0,
    name: "string",
    projectId: "string",
    region: "string",
    type: "string",
});
Copy
type: scaleway:observability:Source
properties:
    name: string
    projectId: string
    region: string
    retentionDays: 0
    type: string
Copy

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

RetentionDays This property is required. int
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
Name Changes to this property will trigger replacement. string
The name of the data source.
ProjectId Changes to this property will trigger replacement. string
) The ID of the Project the data source is associated with.
Region Changes to this property will trigger replacement. string
) The region where the data source is located.
Type Changes to this property will trigger replacement. string
The type of data source. Possible values are: metrics, logs, or traces.
RetentionDays This property is required. int
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
Name Changes to this property will trigger replacement. string
The name of the data source.
ProjectId Changes to this property will trigger replacement. string
) The ID of the Project the data source is associated with.
Region Changes to this property will trigger replacement. string
) The region where the data source is located.
Type Changes to this property will trigger replacement. string
The type of data source. Possible values are: metrics, logs, or traces.
retentionDays This property is required. Integer
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
name Changes to this property will trigger replacement. String
The name of the data source.
projectId Changes to this property will trigger replacement. String
) The ID of the Project the data source is associated with.
region Changes to this property will trigger replacement. String
) The region where the data source is located.
type Changes to this property will trigger replacement. String
The type of data source. Possible values are: metrics, logs, or traces.
retentionDays This property is required. number
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
name Changes to this property will trigger replacement. string
The name of the data source.
projectId Changes to this property will trigger replacement. string
) The ID of the Project the data source is associated with.
region Changes to this property will trigger replacement. string
) The region where the data source is located.
type Changes to this property will trigger replacement. string
The type of data source. Possible values are: metrics, logs, or traces.
retention_days This property is required. int
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
name Changes to this property will trigger replacement. str
The name of the data source.
project_id Changes to this property will trigger replacement. str
) The ID of the Project the data source is associated with.
region Changes to this property will trigger replacement. str
) The region where the data source is located.
type Changes to this property will trigger replacement. str
The type of data source. Possible values are: metrics, logs, or traces.
retentionDays This property is required. Number
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
name Changes to this property will trigger replacement. String
The name of the data source.
projectId Changes to this property will trigger replacement. String
) The ID of the Project the data source is associated with.
region Changes to this property will trigger replacement. String
) The region where the data source is located.
type Changes to this property will trigger replacement. String
The type of data source. Possible values are: metrics, logs, or traces.

Outputs

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

CreatedAt string
The date and time the data source was created (in RFC 3339 format).
Id string
The provider-assigned unique ID for this managed resource.
Origin string
The origin of the Cockpit data source.
PushUrl string
The URL endpoint used for pushing data to the Cockpit data source.
SynchronizedWithGrafana bool
Indicates whether the data source is synchronized with Grafana.
UpdatedAt string
The date and time the data source was last updated (in RFC 3339 format).
Url string
The URL of the Cockpit data source.
CreatedAt string
The date and time the data source was created (in RFC 3339 format).
Id string
The provider-assigned unique ID for this managed resource.
Origin string
The origin of the Cockpit data source.
PushUrl string
The URL endpoint used for pushing data to the Cockpit data source.
SynchronizedWithGrafana bool
Indicates whether the data source is synchronized with Grafana.
UpdatedAt string
The date and time the data source was last updated (in RFC 3339 format).
Url string
The URL of the Cockpit data source.
createdAt String
The date and time the data source was created (in RFC 3339 format).
id String
The provider-assigned unique ID for this managed resource.
origin String
The origin of the Cockpit data source.
pushUrl String
The URL endpoint used for pushing data to the Cockpit data source.
synchronizedWithGrafana Boolean
Indicates whether the data source is synchronized with Grafana.
updatedAt String
The date and time the data source was last updated (in RFC 3339 format).
url String
The URL of the Cockpit data source.
createdAt string
The date and time the data source was created (in RFC 3339 format).
id string
The provider-assigned unique ID for this managed resource.
origin string
The origin of the Cockpit data source.
pushUrl string
The URL endpoint used for pushing data to the Cockpit data source.
synchronizedWithGrafana boolean
Indicates whether the data source is synchronized with Grafana.
updatedAt string
The date and time the data source was last updated (in RFC 3339 format).
url string
The URL of the Cockpit data source.
created_at str
The date and time the data source was created (in RFC 3339 format).
id str
The provider-assigned unique ID for this managed resource.
origin str
The origin of the Cockpit data source.
push_url str
The URL endpoint used for pushing data to the Cockpit data source.
synchronized_with_grafana bool
Indicates whether the data source is synchronized with Grafana.
updated_at str
The date and time the data source was last updated (in RFC 3339 format).
url str
The URL of the Cockpit data source.
createdAt String
The date and time the data source was created (in RFC 3339 format).
id String
The provider-assigned unique ID for this managed resource.
origin String
The origin of the Cockpit data source.
pushUrl String
The URL endpoint used for pushing data to the Cockpit data source.
synchronizedWithGrafana Boolean
Indicates whether the data source is synchronized with Grafana.
updatedAt String
The date and time the data source was last updated (in RFC 3339 format).
url String
The URL of the Cockpit data source.

Look up Existing Source Resource

Get an existing Source 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?: SourceState, opts?: CustomResourceOptions): Source
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        name: Optional[str] = None,
        origin: Optional[str] = None,
        project_id: Optional[str] = None,
        push_url: Optional[str] = None,
        region: Optional[str] = None,
        retention_days: Optional[int] = None,
        synchronized_with_grafana: Optional[bool] = None,
        type: Optional[str] = None,
        updated_at: Optional[str] = None,
        url: Optional[str] = None) -> Source
func GetSource(ctx *Context, name string, id IDInput, state *SourceState, opts ...ResourceOption) (*Source, error)
public static Source Get(string name, Input<string> id, SourceState? state, CustomResourceOptions? opts = null)
public static Source get(String name, Output<String> id, SourceState state, CustomResourceOptions options)
resources:  _:    type: scaleway:observability:Source    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
The date and time the data source was created (in RFC 3339 format).
Name Changes to this property will trigger replacement. string
The name of the data source.
Origin string
The origin of the Cockpit data source.
ProjectId Changes to this property will trigger replacement. string
) The ID of the Project the data source is associated with.
PushUrl string
The URL endpoint used for pushing data to the Cockpit data source.
Region Changes to this property will trigger replacement. string
) The region where the data source is located.
RetentionDays int
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
SynchronizedWithGrafana bool
Indicates whether the data source is synchronized with Grafana.
Type Changes to this property will trigger replacement. string
The type of data source. Possible values are: metrics, logs, or traces.
UpdatedAt string
The date and time the data source was last updated (in RFC 3339 format).
Url string
The URL of the Cockpit data source.
CreatedAt string
The date and time the data source was created (in RFC 3339 format).
Name Changes to this property will trigger replacement. string
The name of the data source.
Origin string
The origin of the Cockpit data source.
ProjectId Changes to this property will trigger replacement. string
) The ID of the Project the data source is associated with.
PushUrl string
The URL endpoint used for pushing data to the Cockpit data source.
Region Changes to this property will trigger replacement. string
) The region where the data source is located.
RetentionDays int
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
SynchronizedWithGrafana bool
Indicates whether the data source is synchronized with Grafana.
Type Changes to this property will trigger replacement. string
The type of data source. Possible values are: metrics, logs, or traces.
UpdatedAt string
The date and time the data source was last updated (in RFC 3339 format).
Url string
The URL of the Cockpit data source.
createdAt String
The date and time the data source was created (in RFC 3339 format).
name Changes to this property will trigger replacement. String
The name of the data source.
origin String
The origin of the Cockpit data source.
projectId Changes to this property will trigger replacement. String
) The ID of the Project the data source is associated with.
pushUrl String
The URL endpoint used for pushing data to the Cockpit data source.
region Changes to this property will trigger replacement. String
) The region where the data source is located.
retentionDays Integer
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
synchronizedWithGrafana Boolean
Indicates whether the data source is synchronized with Grafana.
type Changes to this property will trigger replacement. String
The type of data source. Possible values are: metrics, logs, or traces.
updatedAt String
The date and time the data source was last updated (in RFC 3339 format).
url String
The URL of the Cockpit data source.
createdAt string
The date and time the data source was created (in RFC 3339 format).
name Changes to this property will trigger replacement. string
The name of the data source.
origin string
The origin of the Cockpit data source.
projectId Changes to this property will trigger replacement. string
) The ID of the Project the data source is associated with.
pushUrl string
The URL endpoint used for pushing data to the Cockpit data source.
region Changes to this property will trigger replacement. string
) The region where the data source is located.
retentionDays number
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
synchronizedWithGrafana boolean
Indicates whether the data source is synchronized with Grafana.
type Changes to this property will trigger replacement. string
The type of data source. Possible values are: metrics, logs, or traces.
updatedAt string
The date and time the data source was last updated (in RFC 3339 format).
url string
The URL of the Cockpit data source.
created_at str
The date and time the data source was created (in RFC 3339 format).
name Changes to this property will trigger replacement. str
The name of the data source.
origin str
The origin of the Cockpit data source.
project_id Changes to this property will trigger replacement. str
) The ID of the Project the data source is associated with.
push_url str
The URL endpoint used for pushing data to the Cockpit data source.
region Changes to this property will trigger replacement. str
) The region where the data source is located.
retention_days int
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
synchronized_with_grafana bool
Indicates whether the data source is synchronized with Grafana.
type Changes to this property will trigger replacement. str
The type of data source. Possible values are: metrics, logs, or traces.
updated_at str
The date and time the data source was last updated (in RFC 3339 format).
url str
The URL of the Cockpit data source.
createdAt String
The date and time the data source was created (in RFC 3339 format).
name Changes to this property will trigger replacement. String
The name of the data source.
origin String
The origin of the Cockpit data source.
projectId Changes to this property will trigger replacement. String
) The ID of the Project the data source is associated with.
pushUrl String
The URL endpoint used for pushing data to the Cockpit data source.
region Changes to this property will trigger replacement. String
) The region where the data source is located.
retentionDays Number
The number of days to retain data in the data source. Must be a value between 1 and 365. For more details on retention policies, please refer to the Scaleway Retention Documentation. Note: Changes to this field will force the creation of a new resource.
synchronizedWithGrafana Boolean
Indicates whether the data source is synchronized with Grafana.
type Changes to this property will trigger replacement. String
The type of data source. Possible values are: metrics, logs, or traces.
updatedAt String
The date and time the data source was last updated (in RFC 3339 format).
url String
The URL of the Cockpit data source.

Import

This section explains how to import a data source using the ID of the region it is located in, in the {region}/{id} format.

bash

$ pulumi import scaleway:observability/source:Source main fr-par/11111111-1111-1111-1111-111111111111
Copy

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

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.