feat: Allow move state on new Observability resources (#593)
* feat: Allow move state on new Observability resources * Extend description to explain how to move a argus resource to observability * Update argus docs with examples how to move a resource to observability --------- Co-authored-by: Marcel Jacek <Marcel.Jacek@stackit.cloud>
This commit is contained in:
parent
fc805d8e1d
commit
1a66887c01
12 changed files with 438 additions and 15 deletions
50
stackit/internal/services/argus/scrapeconfig/const.go
Normal file
50
stackit/internal/services/argus/scrapeconfig/const.go
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
package argus
|
||||
|
||||
const exampleMoveToObservability = "## Example move\n" +
|
||||
"Example to move the deprecated `stackit_argus_scrapeconfig` resource to the new `stackit_observability_scrapeconfig` resource:" + "\n" +
|
||||
"1. Add a new `stackit_observability_scrapeconfig` resource with the same values like your previous `stackit_argus_scrapeconfig` resource." + "\n" +
|
||||
"1. Add a moved block which reference the `stackit_argus_scrapeconfig` and `stackit_observability_scrapeconfig` resource." + "\n" +
|
||||
"1. Remove your old `stackit_argus_scrapeconfig` resource and run `$ terraform apply`." + "\n" +
|
||||
"```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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
` + "```" + "\n"
|
||||
Loading…
Add table
Add a link
Reference in a new issue