1. Packages
  2. stackit
  3. API Docs
  4. ObservabilityScrapeconfig
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    Observability scrape config resource schema. Must have a region specified in the provider configuration.

    Example Usage

    resource "stackit_observability_scrapeconfig" "example" {
      project_id   = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      instance_id  = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      name         = "example-job"
      metrics_path = "/my-metrics"
      saml2 = {
        enable_url_parameters = true
      }
      targets = [
        {
          urls = ["url1", "urls2"]
          labels = {
            "url1" = "dev"
          }
        }
      ]
    }
    
    # Only use the import statement, if you want to import an existing observability scrapeconfig
    import {
      to = stackit_observability_scrapeconfig.import-example
      id = "${var.project_id},${var.observability_instance_id},${var.observability_scrapeconfig_name}"
    }
    

    Create ObservabilityScrapeconfig Resource

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

    Constructor syntax

    new ObservabilityScrapeconfig(name: string, args: ObservabilityScrapeconfigArgs, opts?: CustomResourceOptions);
    @overload
    def ObservabilityScrapeconfig(resource_name: str,
                                  args: ObservabilityScrapeconfigArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ObservabilityScrapeconfig(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  instance_id: Optional[str] = None,
                                  metrics_path: Optional[str] = None,
                                  project_id: Optional[str] = None,
                                  targets: Optional[Sequence[ObservabilityScrapeconfigTargetArgs]] = None,
                                  basic_auth: Optional[ObservabilityScrapeconfigBasicAuthArgs] = None,
                                  name: Optional[str] = None,
                                  saml2: Optional[ObservabilityScrapeconfigSaml2Args] = None,
                                  sample_limit: Optional[int] = None,
                                  scheme: Optional[str] = None,
                                  scrape_interval: Optional[str] = None,
                                  scrape_timeout: Optional[str] = None)
    func NewObservabilityScrapeconfig(ctx *Context, name string, args ObservabilityScrapeconfigArgs, opts ...ResourceOption) (*ObservabilityScrapeconfig, error)
    public ObservabilityScrapeconfig(string name, ObservabilityScrapeconfigArgs args, CustomResourceOptions? opts = null)
    public ObservabilityScrapeconfig(String name, ObservabilityScrapeconfigArgs args)
    public ObservabilityScrapeconfig(String name, ObservabilityScrapeconfigArgs args, CustomResourceOptions options)
    
    type: stackit:ObservabilityScrapeconfig
    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 ObservabilityScrapeconfigArgs
    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 ObservabilityScrapeconfigArgs
    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 ObservabilityScrapeconfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ObservabilityScrapeconfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ObservabilityScrapeconfigArgs
    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 observabilityScrapeconfigResource = new Stackit.ObservabilityScrapeconfig("observabilityScrapeconfigResource", new()
    {
        InstanceId = "string",
        MetricsPath = "string",
        ProjectId = "string",
        Targets = new[]
        {
            new Stackit.Inputs.ObservabilityScrapeconfigTargetArgs
            {
                Urls = new[]
                {
                    "string",
                },
                Labels = 
                {
                    { "string", "string" },
                },
            },
        },
        BasicAuth = new Stackit.Inputs.ObservabilityScrapeconfigBasicAuthArgs
        {
            Password = "string",
            Username = "string",
        },
        Name = "string",
        Saml2 = new Stackit.Inputs.ObservabilityScrapeconfigSaml2Args
        {
            EnableUrlParameters = false,
        },
        SampleLimit = 0,
        Scheme = "string",
        ScrapeInterval = "string",
        ScrapeTimeout = "string",
    });
    
    example, err := stackit.NewObservabilityScrapeconfig(ctx, "observabilityScrapeconfigResource", &stackit.ObservabilityScrapeconfigArgs{
    	InstanceId:  pulumi.String("string"),
    	MetricsPath: pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Targets: stackit.ObservabilityScrapeconfigTargetArray{
    		&stackit.ObservabilityScrapeconfigTargetArgs{
    			Urls: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Labels: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    	},
    	BasicAuth: &stackit.ObservabilityScrapeconfigBasicAuthArgs{
    		Password: pulumi.String("string"),
    		Username: pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Saml2: &stackit.ObservabilityScrapeconfigSaml2Args{
    		EnableUrlParameters: pulumi.Bool(false),
    	},
    	SampleLimit:    pulumi.Int(0),
    	Scheme:         pulumi.String("string"),
    	ScrapeInterval: pulumi.String("string"),
    	ScrapeTimeout:  pulumi.String("string"),
    })
    
    var observabilityScrapeconfigResource = new ObservabilityScrapeconfig("observabilityScrapeconfigResource", ObservabilityScrapeconfigArgs.builder()
        .instanceId("string")
        .metricsPath("string")
        .projectId("string")
        .targets(ObservabilityScrapeconfigTargetArgs.builder()
            .urls("string")
            .labels(Map.of("string", "string"))
            .build())
        .basicAuth(ObservabilityScrapeconfigBasicAuthArgs.builder()
            .password("string")
            .username("string")
            .build())
        .name("string")
        .saml2(ObservabilityScrapeconfigSaml2Args.builder()
            .enableUrlParameters(false)
            .build())
        .sampleLimit(0)
        .scheme("string")
        .scrapeInterval("string")
        .scrapeTimeout("string")
        .build());
    
    observability_scrapeconfig_resource = stackit.ObservabilityScrapeconfig("observabilityScrapeconfigResource",
        instance_id="string",
        metrics_path="string",
        project_id="string",
        targets=[{
            "urls": ["string"],
            "labels": {
                "string": "string",
            },
        }],
        basic_auth={
            "password": "string",
            "username": "string",
        },
        name="string",
        saml2={
            "enable_url_parameters": False,
        },
        sample_limit=0,
        scheme="string",
        scrape_interval="string",
        scrape_timeout="string")
    
    const observabilityScrapeconfigResource = new stackit.ObservabilityScrapeconfig("observabilityScrapeconfigResource", {
        instanceId: "string",
        metricsPath: "string",
        projectId: "string",
        targets: [{
            urls: ["string"],
            labels: {
                string: "string",
            },
        }],
        basicAuth: {
            password: "string",
            username: "string",
        },
        name: "string",
        saml2: {
            enableUrlParameters: false,
        },
        sampleLimit: 0,
        scheme: "string",
        scrapeInterval: "string",
        scrapeTimeout: "string",
    });
    
    type: stackit:ObservabilityScrapeconfig
    properties:
        basicAuth:
            password: string
            username: string
        instanceId: string
        metricsPath: string
        name: string
        projectId: string
        saml2:
            enableUrlParameters: false
        sampleLimit: 0
        scheme: string
        scrapeInterval: string
        scrapeTimeout: string
        targets:
            - labels:
                string: string
              urls:
                - string
    

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

    InstanceId string
    Observability instance ID to which the scraping job is associated.
    MetricsPath string
    Specifies the job scraping url path. E.g. /metrics.
    ProjectId string
    STACKIT project ID to which the scraping job is associated.
    Targets List<ObservabilityScrapeconfigTarget>
    The targets list (specified by the static config).
    BasicAuth ObservabilityScrapeconfigBasicAuth
    A basic authentication block.
    Name string
    Specifies the name of the scraping job.
    Saml2 ObservabilityScrapeconfigSaml2
    A SAML2 configuration block.
    SampleLimit int
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    Scheme string
    Specifies the http scheme. Defaults to https.
    ScrapeInterval string
    Specifies the scrape interval as duration string. Defaults to 5m.
    ScrapeTimeout string
    Specifies the scrape timeout as duration string. Defaults to 2m.
    InstanceId string
    Observability instance ID to which the scraping job is associated.
    MetricsPath string
    Specifies the job scraping url path. E.g. /metrics.
    ProjectId string
    STACKIT project ID to which the scraping job is associated.
    Targets []ObservabilityScrapeconfigTargetArgs
    The targets list (specified by the static config).
    BasicAuth ObservabilityScrapeconfigBasicAuthArgs
    A basic authentication block.
    Name string
    Specifies the name of the scraping job.
    Saml2 ObservabilityScrapeconfigSaml2Args
    A SAML2 configuration block.
    SampleLimit int
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    Scheme string
    Specifies the http scheme. Defaults to https.
    ScrapeInterval string
    Specifies the scrape interval as duration string. Defaults to 5m.
    ScrapeTimeout string
    Specifies the scrape timeout as duration string. Defaults to 2m.
    instanceId String
    Observability instance ID to which the scraping job is associated.
    metricsPath String
    Specifies the job scraping url path. E.g. /metrics.
    projectId String
    STACKIT project ID to which the scraping job is associated.
    targets List<ObservabilityScrapeconfigTarget>
    The targets list (specified by the static config).
    basicAuth ObservabilityScrapeconfigBasicAuth
    A basic authentication block.
    name String
    Specifies the name of the scraping job.
    saml2 ObservabilityScrapeconfigSaml2
    A SAML2 configuration block.
    sampleLimit Integer
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme String
    Specifies the http scheme. Defaults to https.
    scrapeInterval String
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrapeTimeout String
    Specifies the scrape timeout as duration string. Defaults to 2m.
    instanceId string
    Observability instance ID to which the scraping job is associated.
    metricsPath string
    Specifies the job scraping url path. E.g. /metrics.
    projectId string
    STACKIT project ID to which the scraping job is associated.
    targets ObservabilityScrapeconfigTarget[]
    The targets list (specified by the static config).
    basicAuth ObservabilityScrapeconfigBasicAuth
    A basic authentication block.
    name string
    Specifies the name of the scraping job.
    saml2 ObservabilityScrapeconfigSaml2
    A SAML2 configuration block.
    sampleLimit number
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme string
    Specifies the http scheme. Defaults to https.
    scrapeInterval string
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrapeTimeout string
    Specifies the scrape timeout as duration string. Defaults to 2m.
    instance_id str
    Observability instance ID to which the scraping job is associated.
    metrics_path str
    Specifies the job scraping url path. E.g. /metrics.
    project_id str
    STACKIT project ID to which the scraping job is associated.
    targets Sequence[ObservabilityScrapeconfigTargetArgs]
    The targets list (specified by the static config).
    basic_auth ObservabilityScrapeconfigBasicAuthArgs
    A basic authentication block.
    name str
    Specifies the name of the scraping job.
    saml2 ObservabilityScrapeconfigSaml2Args
    A SAML2 configuration block.
    sample_limit int
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme str
    Specifies the http scheme. Defaults to https.
    scrape_interval str
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrape_timeout str
    Specifies the scrape timeout as duration string. Defaults to 2m.
    instanceId String
    Observability instance ID to which the scraping job is associated.
    metricsPath String
    Specifies the job scraping url path. E.g. /metrics.
    projectId String
    STACKIT project ID to which the scraping job is associated.
    targets List<Property Map>
    The targets list (specified by the static config).
    basicAuth Property Map
    A basic authentication block.
    name String
    Specifies the name of the scraping job.
    saml2 Property Map
    A SAML2 configuration block.
    sampleLimit Number
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme String
    Specifies the http scheme. Defaults to https.
    scrapeInterval String
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrapeTimeout String
    Specifies the scrape timeout as duration string. Defaults to 2m.

    Outputs

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

    Get an existing ObservabilityScrapeconfig 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?: ObservabilityScrapeconfigState, opts?: CustomResourceOptions): ObservabilityScrapeconfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            basic_auth: Optional[ObservabilityScrapeconfigBasicAuthArgs] = None,
            instance_id: Optional[str] = None,
            metrics_path: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            saml2: Optional[ObservabilityScrapeconfigSaml2Args] = None,
            sample_limit: Optional[int] = None,
            scheme: Optional[str] = None,
            scrape_interval: Optional[str] = None,
            scrape_timeout: Optional[str] = None,
            targets: Optional[Sequence[ObservabilityScrapeconfigTargetArgs]] = None) -> ObservabilityScrapeconfig
    func GetObservabilityScrapeconfig(ctx *Context, name string, id IDInput, state *ObservabilityScrapeconfigState, opts ...ResourceOption) (*ObservabilityScrapeconfig, error)
    public static ObservabilityScrapeconfig Get(string name, Input<string> id, ObservabilityScrapeconfigState? state, CustomResourceOptions? opts = null)
    public static ObservabilityScrapeconfig get(String name, Output<String> id, ObservabilityScrapeconfigState state, CustomResourceOptions options)
    resources:  _:    type: stackit:ObservabilityScrapeconfig    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.
    The following state arguments are supported:
    BasicAuth ObservabilityScrapeconfigBasicAuth
    A basic authentication block.
    InstanceId string
    Observability instance ID to which the scraping job is associated.
    MetricsPath string
    Specifies the job scraping url path. E.g. /metrics.
    Name string
    Specifies the name of the scraping job.
    ProjectId string
    STACKIT project ID to which the scraping job is associated.
    Saml2 ObservabilityScrapeconfigSaml2
    A SAML2 configuration block.
    SampleLimit int
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    Scheme string
    Specifies the http scheme. Defaults to https.
    ScrapeInterval string
    Specifies the scrape interval as duration string. Defaults to 5m.
    ScrapeTimeout string
    Specifies the scrape timeout as duration string. Defaults to 2m.
    Targets List<ObservabilityScrapeconfigTarget>
    The targets list (specified by the static config).
    BasicAuth ObservabilityScrapeconfigBasicAuthArgs
    A basic authentication block.
    InstanceId string
    Observability instance ID to which the scraping job is associated.
    MetricsPath string
    Specifies the job scraping url path. E.g. /metrics.
    Name string
    Specifies the name of the scraping job.
    ProjectId string
    STACKIT project ID to which the scraping job is associated.
    Saml2 ObservabilityScrapeconfigSaml2Args
    A SAML2 configuration block.
    SampleLimit int
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    Scheme string
    Specifies the http scheme. Defaults to https.
    ScrapeInterval string
    Specifies the scrape interval as duration string. Defaults to 5m.
    ScrapeTimeout string
    Specifies the scrape timeout as duration string. Defaults to 2m.
    Targets []ObservabilityScrapeconfigTargetArgs
    The targets list (specified by the static config).
    basicAuth ObservabilityScrapeconfigBasicAuth
    A basic authentication block.
    instanceId String
    Observability instance ID to which the scraping job is associated.
    metricsPath String
    Specifies the job scraping url path. E.g. /metrics.
    name String
    Specifies the name of the scraping job.
    projectId String
    STACKIT project ID to which the scraping job is associated.
    saml2 ObservabilityScrapeconfigSaml2
    A SAML2 configuration block.
    sampleLimit Integer
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme String
    Specifies the http scheme. Defaults to https.
    scrapeInterval String
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrapeTimeout String
    Specifies the scrape timeout as duration string. Defaults to 2m.
    targets List<ObservabilityScrapeconfigTarget>
    The targets list (specified by the static config).
    basicAuth ObservabilityScrapeconfigBasicAuth
    A basic authentication block.
    instanceId string
    Observability instance ID to which the scraping job is associated.
    metricsPath string
    Specifies the job scraping url path. E.g. /metrics.
    name string
    Specifies the name of the scraping job.
    projectId string
    STACKIT project ID to which the scraping job is associated.
    saml2 ObservabilityScrapeconfigSaml2
    A SAML2 configuration block.
    sampleLimit number
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme string
    Specifies the http scheme. Defaults to https.
    scrapeInterval string
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrapeTimeout string
    Specifies the scrape timeout as duration string. Defaults to 2m.
    targets ObservabilityScrapeconfigTarget[]
    The targets list (specified by the static config).
    basic_auth ObservabilityScrapeconfigBasicAuthArgs
    A basic authentication block.
    instance_id str
    Observability instance ID to which the scraping job is associated.
    metrics_path str
    Specifies the job scraping url path. E.g. /metrics.
    name str
    Specifies the name of the scraping job.
    project_id str
    STACKIT project ID to which the scraping job is associated.
    saml2 ObservabilityScrapeconfigSaml2Args
    A SAML2 configuration block.
    sample_limit int
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme str
    Specifies the http scheme. Defaults to https.
    scrape_interval str
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrape_timeout str
    Specifies the scrape timeout as duration string. Defaults to 2m.
    targets Sequence[ObservabilityScrapeconfigTargetArgs]
    The targets list (specified by the static config).
    basicAuth Property Map
    A basic authentication block.
    instanceId String
    Observability instance ID to which the scraping job is associated.
    metricsPath String
    Specifies the job scraping url path. E.g. /metrics.
    name String
    Specifies the name of the scraping job.
    projectId String
    STACKIT project ID to which the scraping job is associated.
    saml2 Property Map
    A SAML2 configuration block.
    sampleLimit Number
    Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to 5000.
    scheme String
    Specifies the http scheme. Defaults to https.
    scrapeInterval String
    Specifies the scrape interval as duration string. Defaults to 5m.
    scrapeTimeout String
    Specifies the scrape timeout as duration string. Defaults to 2m.
    targets List<Property Map>
    The targets list (specified by the static config).

    Supporting Types

    ObservabilityScrapeconfigBasicAuth, ObservabilityScrapeconfigBasicAuthArgs

    Password string
    Specifies basic auth password.
    Username string
    Specifies basic auth username.
    Password string
    Specifies basic auth password.
    Username string
    Specifies basic auth username.
    password String
    Specifies basic auth password.
    username String
    Specifies basic auth username.
    password string
    Specifies basic auth password.
    username string
    Specifies basic auth username.
    password str
    Specifies basic auth password.
    username str
    Specifies basic auth username.
    password String
    Specifies basic auth password.
    username String
    Specifies basic auth username.

    ObservabilityScrapeconfigSaml2, ObservabilityScrapeconfigSaml2Args

    EnableUrlParameters bool
    Specifies if URL parameters are enabled. Defaults to true
    EnableUrlParameters bool
    Specifies if URL parameters are enabled. Defaults to true
    enableUrlParameters Boolean
    Specifies if URL parameters are enabled. Defaults to true
    enableUrlParameters boolean
    Specifies if URL parameters are enabled. Defaults to true
    enable_url_parameters bool
    Specifies if URL parameters are enabled. Defaults to true
    enableUrlParameters Boolean
    Specifies if URL parameters are enabled. Defaults to true

    ObservabilityScrapeconfigTarget, ObservabilityScrapeconfigTargetArgs

    Urls List<string>
    Specifies target URLs.
    Labels Dictionary<string, string>
    Specifies labels.
    Urls []string
    Specifies target URLs.
    Labels map[string]string
    Specifies labels.
    urls List<String>
    Specifies target URLs.
    labels Map<String,String>
    Specifies labels.
    urls string[]
    Specifies target URLs.
    labels {[key: string]: string}
    Specifies labels.
    urls Sequence[str]
    Specifies target URLs.
    labels Mapping[str, str]
    Specifies labels.
    urls List<String>
    Specifies target URLs.
    labels Map<String>
    Specifies labels.

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.