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,
});
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)
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
	})
}
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,
    });
});
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());
    }
}
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
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 string
- The unique name of the resource.
- args SourceArgs
- 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 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 string
- The unique name of the resource.
- args SourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var sourceResource = new Source("sourceResource", SourceArgs.builder()
    .retentionDays(0)
    .name("string")
    .projectId("string")
    .region("string")
    .type("string")
    .build());
source_resource = scaleway.observability.Source("sourceResource",
    retention_days=0,
    name="string",
    project_id="string",
    region="string",
    type="string")
const sourceResource = new scaleway.observability.Source("sourceResource", {
    retentionDays: 0,
    name: "string",
    projectId: "string",
    region: "string",
    type: "string",
});
type: scaleway:observability:Source
properties:
    name: string
    projectId: string
    region: string
    retentionDays: 0
    type: string
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 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 string
- The name of the data source.
- ProjectId string
- ) The ID of the Project the data source is associated with.
- Region string
- ) The region where the data source is located.
- Type string
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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.
- Name string
- The name of the data source.
- ProjectId string
- ) The ID of the Project the data source is associated with.
- Region string
- ) The region where the data source is located.
- Type string
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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.
- name String
- The name of the data source.
- projectId String
- ) The ID of the Project the data source is associated with.
- region String
- ) The region where the data source is located.
- type String
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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.
- name string
- The name of the data source.
- projectId string
- ) The ID of the Project the data source is associated with.
- region string
- ) The region where the data source is located.
- type string
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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.
- name str
- The name of the data source.
- project_id str
- ) The ID of the Project the data source is associated with.
- region str
- ) The region where the data source is located.
- type str
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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.
- name String
- The name of the data source.
- projectId String
- ) The ID of the Project the data source is associated with.
- region String
- ) The region where the data source is located.
- type String
- The type of data source. Possible values are: metrics,logs, ortraces.
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.
- SynchronizedWith boolGrafana 
- 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.
- SynchronizedWith boolGrafana 
- 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.
- synchronizedWith BooleanGrafana 
- 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.
- synchronizedWith booleanGrafana 
- 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_ boolgrafana 
- 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.
- synchronizedWith BooleanGrafana 
- 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) -> Sourcefunc 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
- 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.
- CreatedAt string
- The date and time the data source was created (in RFC 3339 format).
- Name string
- The name of the data source.
- Origin string
- The origin of the Cockpit data source.
- ProjectId 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 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.
- SynchronizedWith boolGrafana 
- Indicates whether the data source is synchronized with Grafana.
- Type string
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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 string
- The name of the data source.
- Origin string
- The origin of the Cockpit data source.
- ProjectId 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 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.
- SynchronizedWith boolGrafana 
- Indicates whether the data source is synchronized with Grafana.
- Type string
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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 String
- The name of the data source.
- origin String
- The origin of the Cockpit data source.
- projectId 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 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.
- synchronizedWith BooleanGrafana 
- Indicates whether the data source is synchronized with Grafana.
- type String
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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 string
- The name of the data source.
- origin string
- The origin of the Cockpit data source.
- projectId 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 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.
- synchronizedWith booleanGrafana 
- Indicates whether the data source is synchronized with Grafana.
- type string
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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 str
- The name of the data source.
- origin str
- The origin of the Cockpit data source.
- project_id 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 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_ boolgrafana 
- Indicates whether the data source is synchronized with Grafana.
- type str
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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 String
- The name of the data source.
- origin String
- The origin of the Cockpit data source.
- projectId 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 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.
- synchronizedWith BooleanGrafana 
- Indicates whether the data source is synchronized with Grafana.
- type String
- The type of data source. Possible values are: metrics,logs, ortraces.
- 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
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 scalewayTerraform Provider.
