published on Friday, Feb 20, 2026 by stackitcloud
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:
- Instance
Id string - Observability instance ID to which the scraping job is associated.
- Metrics
Path string - Specifies the job scraping url path. E.g.
/metrics. - Project
Id string - STACKIT project ID to which the scraping job is associated.
- Targets
List<Observability
Scrapeconfig Target> - The targets list (specified by the static config).
- Basic
Auth ObservabilityScrapeconfig Basic Auth - A basic authentication block.
- Name string
- Specifies the name of the scraping job.
- Saml2
Observability
Scrapeconfig Saml2 - A SAML2 configuration block.
- Sample
Limit 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. - Scrape
Interval string - Specifies the scrape interval as duration string. Defaults to
5m. - Scrape
Timeout string - Specifies the scrape timeout as duration string. Defaults to
2m.
- Instance
Id string - Observability instance ID to which the scraping job is associated.
- Metrics
Path string - Specifies the job scraping url path. E.g.
/metrics. - Project
Id string - STACKIT project ID to which the scraping job is associated.
- Targets
[]Observability
Scrapeconfig Target Args - The targets list (specified by the static config).
- Basic
Auth ObservabilityScrapeconfig Basic Auth Args - A basic authentication block.
- Name string
- Specifies the name of the scraping job.
- Saml2
Observability
Scrapeconfig Saml2Args - A SAML2 configuration block.
- Sample
Limit 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. - Scrape
Interval string - Specifies the scrape interval as duration string. Defaults to
5m. - Scrape
Timeout string - Specifies the scrape timeout as duration string. Defaults to
2m.
- instance
Id String - Observability instance ID to which the scraping job is associated.
- metrics
Path String - Specifies the job scraping url path. E.g.
/metrics. - project
Id String - STACKIT project ID to which the scraping job is associated.
- targets
List<Observability
Scrapeconfig Target> - The targets list (specified by the static config).
- basic
Auth ObservabilityScrapeconfig Basic Auth - A basic authentication block.
- name String
- Specifies the name of the scraping job.
- saml2
Observability
Scrapeconfig Saml2 - A SAML2 configuration block.
- sample
Limit 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. - scrape
Interval String - Specifies the scrape interval as duration string. Defaults to
5m. - scrape
Timeout String - Specifies the scrape timeout as duration string. Defaults to
2m.
- instance
Id string - Observability instance ID to which the scraping job is associated.
- metrics
Path string - Specifies the job scraping url path. E.g.
/metrics. - project
Id string - STACKIT project ID to which the scraping job is associated.
- targets
Observability
Scrapeconfig Target[] - The targets list (specified by the static config).
- basic
Auth ObservabilityScrapeconfig Basic Auth - A basic authentication block.
- name string
- Specifies the name of the scraping job.
- saml2
Observability
Scrapeconfig Saml2 - A SAML2 configuration block.
- sample
Limit 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. - scrape
Interval string - Specifies the scrape interval as duration string. Defaults to
5m. - scrape
Timeout 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[Observability
Scrapeconfig Target Args] - The targets list (specified by the static config).
- basic_
auth ObservabilityScrapeconfig Basic Auth Args - A basic authentication block.
- name str
- Specifies the name of the scraping job.
- saml2
Observability
Scrapeconfig Saml2Args - 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.
- instance
Id String - Observability instance ID to which the scraping job is associated.
- metrics
Path String - Specifies the job scraping url path. E.g.
/metrics. - project
Id String - STACKIT project ID to which the scraping job is associated.
- targets List<Property Map>
- The targets list (specified by the static config).
- basic
Auth Property Map - A basic authentication block.
- name String
- Specifies the name of the scraping job.
- saml2 Property Map
- A SAML2 configuration block.
- sample
Limit 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. - scrape
Interval String - Specifies the scrape interval as duration string. Defaults to
5m. - scrape
Timeout 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) -> ObservabilityScrapeconfigfunc 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.
- Basic
Auth ObservabilityScrapeconfig Basic Auth - A basic authentication block.
- Instance
Id string - Observability instance ID to which the scraping job is associated.
- Metrics
Path string - Specifies the job scraping url path. E.g.
/metrics. - Name string
- Specifies the name of the scraping job.
- Project
Id string - STACKIT project ID to which the scraping job is associated.
- Saml2
Observability
Scrapeconfig Saml2 - A SAML2 configuration block.
- Sample
Limit 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. - Scrape
Interval string - Specifies the scrape interval as duration string. Defaults to
5m. - Scrape
Timeout string - Specifies the scrape timeout as duration string. Defaults to
2m. - Targets
List<Observability
Scrapeconfig Target> - The targets list (specified by the static config).
- Basic
Auth ObservabilityScrapeconfig Basic Auth Args - A basic authentication block.
- Instance
Id string - Observability instance ID to which the scraping job is associated.
- Metrics
Path string - Specifies the job scraping url path. E.g.
/metrics. - Name string
- Specifies the name of the scraping job.
- Project
Id string - STACKIT project ID to which the scraping job is associated.
- Saml2
Observability
Scrapeconfig Saml2Args - A SAML2 configuration block.
- Sample
Limit 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. - Scrape
Interval string - Specifies the scrape interval as duration string. Defaults to
5m. - Scrape
Timeout string - Specifies the scrape timeout as duration string. Defaults to
2m. - Targets
[]Observability
Scrapeconfig Target Args - The targets list (specified by the static config).
- basic
Auth ObservabilityScrapeconfig Basic Auth - A basic authentication block.
- instance
Id String - Observability instance ID to which the scraping job is associated.
- metrics
Path String - Specifies the job scraping url path. E.g.
/metrics. - name String
- Specifies the name of the scraping job.
- project
Id String - STACKIT project ID to which the scraping job is associated.
- saml2
Observability
Scrapeconfig Saml2 - A SAML2 configuration block.
- sample
Limit 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. - scrape
Interval String - Specifies the scrape interval as duration string. Defaults to
5m. - scrape
Timeout String - Specifies the scrape timeout as duration string. Defaults to
2m. - targets
List<Observability
Scrapeconfig Target> - The targets list (specified by the static config).
- basic
Auth ObservabilityScrapeconfig Basic Auth - A basic authentication block.
- instance
Id string - Observability instance ID to which the scraping job is associated.
- metrics
Path string - Specifies the job scraping url path. E.g.
/metrics. - name string
- Specifies the name of the scraping job.
- project
Id string - STACKIT project ID to which the scraping job is associated.
- saml2
Observability
Scrapeconfig Saml2 - A SAML2 configuration block.
- sample
Limit 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. - scrape
Interval string - Specifies the scrape interval as duration string. Defaults to
5m. - scrape
Timeout string - Specifies the scrape timeout as duration string. Defaults to
2m. - targets
Observability
Scrapeconfig Target[] - The targets list (specified by the static config).
- basic_
auth ObservabilityScrapeconfig Basic Auth Args - 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
Observability
Scrapeconfig Saml2Args - 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[Observability
Scrapeconfig Target Args] - The targets list (specified by the static config).
- basic
Auth Property Map - A basic authentication block.
- instance
Id String - Observability instance ID to which the scraping job is associated.
- metrics
Path String - Specifies the job scraping url path. E.g.
/metrics. - name String
- Specifies the name of the scraping job.
- project
Id String - STACKIT project ID to which the scraping job is associated.
- saml2 Property Map
- A SAML2 configuration block.
- sample
Limit 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. - scrape
Interval String - Specifies the scrape interval as duration string. Defaults to
5m. - scrape
Timeout 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
ObservabilityScrapeconfigSaml2, ObservabilityScrapeconfigSaml2Args
- Enable
Url boolParameters - Specifies if URL parameters are enabled. Defaults to
true
- Enable
Url boolParameters - Specifies if URL parameters are enabled. Defaults to
true
- enable
Url BooleanParameters - Specifies if URL parameters are enabled. Defaults to
true
- enable
Url booleanParameters - Specifies if URL parameters are enabled. Defaults to
true
- enable_
url_ boolparameters - Specifies if URL parameters are enabled. Defaults to
true
- enable
Url BooleanParameters - Specifies if URL parameters are enabled. Defaults to
true
ObservabilityScrapeconfigTarget, ObservabilityScrapeconfigTargetArgs
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Friday, Feb 20, 2026 by stackitcloud
