181 lines
5.7 KiB
Markdown
181 lines
5.7 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "stackit_argus_scrapeconfig Resource - stackit"
|
|
subcategory: ""
|
|
description: |-
|
|
Argus scrape config resource schema. Must have a region specified in the provider configuration.
|
|
!> The stackit_argus_scrapeconfig resource has been deprecated and will be removed after February 26th 2025. Please use stackit_observability_scrapeconfig instead, which offers the exact same functionality.
|
|
Example move
|
|
Example to move the deprecated stackit_argus_scrapeconfig resource to the new stackit_observability_scrapeconfig resource:
|
|
1. Add a new stackit_observability_scrapeconfig resource with the same values like your previous stackit_argus_scrapeconfig resource.
|
|
1. Add a moved block which reference the stackit_argus_scrapeconfig and stackit_observability_scrapeconfig resource.
|
|
1. Remove your old stackit_argus_scrapeconfig resource and run $ terraform apply.
|
|
```terraform
|
|
resource "stackitargusscrapeconfig" "example" {
|
|
projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
instanceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
name = "example-job"
|
|
metricspath = "/my-metrics"
|
|
saml2 = {
|
|
enableurl_parameters = true
|
|
}
|
|
targets = [
|
|
{
|
|
urls = ["url1", "urls2"]
|
|
labels = {
|
|
"url1" = "dev"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
moved {
|
|
from = stackitargusscrapeconfig.example
|
|
to = stackitobservabilityscrapeconfig.example
|
|
}
|
|
resource "stackitobservabilityscrapeconfig" "example" {
|
|
projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
instanceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
name = "example-job"
|
|
metricspath = "/my-metrics"
|
|
saml2 = {
|
|
enableurl_parameters = true
|
|
}
|
|
targets = [
|
|
{
|
|
urls = ["url1", "urls2"]
|
|
labels = {
|
|
"url1" = "dev"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
---
|
|
|
|
# stackit_argus_scrapeconfig (Resource)
|
|
|
|
Argus scrape config resource schema. Must have a `region` specified in the provider configuration.
|
|
|
|
!> The `stackit_argus_scrapeconfig` resource has been deprecated and will be removed after February 26th 2025. Please use `stackit_observability_scrapeconfig` instead, which offers the exact same functionality.
|
|
|
|
## Example move
|
|
Example to move the deprecated `stackit_argus_scrapeconfig` resource to the new `stackit_observability_scrapeconfig` resource:
|
|
1. Add a new `stackit_observability_scrapeconfig` resource with the same values like your previous `stackit_argus_scrapeconfig` resource.
|
|
1. Add a moved block which reference the `stackit_argus_scrapeconfig` and `stackit_observability_scrapeconfig` resource.
|
|
1. Remove your old `stackit_argus_scrapeconfig` resource and run `$ terraform apply`.
|
|
```terraform
|
|
resource "stackit_argus_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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|
|
moved {
|
|
from = stackit_argus_scrapeconfig.example
|
|
to = stackit_observability_scrapeconfig.example
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
resource "stackit_argus_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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `instance_id` (String) Argus 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.
|
|
- `targets` (Attributes List) The targets list (specified by the static config). (see [below for nested schema](#nestedatt--targets))
|
|
|
|
### Optional
|
|
|
|
- `basic_auth` (Attributes) A basic authentication block. (see [below for nested schema](#nestedatt--basic_auth))
|
|
- `saml2` (Attributes) A SAML2 configuration block. (see [below for nested schema](#nestedatt--saml2))
|
|
- `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`.
|
|
|
|
### Read-Only
|
|
|
|
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`,`name`".
|
|
|
|
<a id="nestedatt--targets"></a>
|
|
### Nested Schema for `targets`
|
|
|
|
Required:
|
|
|
|
- `urls` (List of String) Specifies target URLs.
|
|
|
|
Optional:
|
|
|
|
- `labels` (Map of String) Specifies labels.
|
|
|
|
|
|
<a id="nestedatt--basic_auth"></a>
|
|
### Nested Schema for `basic_auth`
|
|
|
|
Required:
|
|
|
|
- `password` (String, Sensitive) Specifies basic auth password.
|
|
- `username` (String) Specifies basic auth username.
|
|
|
|
|
|
<a id="nestedatt--saml2"></a>
|
|
### Nested Schema for `saml2`
|
|
|
|
Optional:
|
|
|
|
- `enable_url_parameters` (Boolean) Specifies if URL parameters are enabled. Defaults to `true`
|