terraform-provider-stackitp.../stackit/internal/services/argus/instance/const.go
João Palet 1a66887c01
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>
2025-01-20 09:54:30 +01:00

34 lines
1.6 KiB
Go

package argus
const exampleMoveToObservability = "## Example move\n" +
"Example to move the deprecated `stackit_argus_instance` resource to the new`stackit_observability_instance` resource:" + "\n" +
"1. Add a new `stackit_observability_instance` resource with the same values like your previous `stackit_argus_instance` resource." + "\n" +
"1. Add a moved block which reference the `stackit_argus_instance` and `stackit_observability_instance` resource." + "\n" +
"1. Remove your old `stackit_argus_instance` resource and run `$ terraform apply`." + "\n" +
"```terraform" +
`
resource "stackit_argus_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
plan_name = "Monitoring-Medium-EU01"
acl = ["1.1.1.1/32", "2.2.2.2/32"]
metrics_retention_days = 7
metrics_retention_days_5m_downsampling = 30
metrics_retention_days_1h_downsampling = 365
}
moved {
from = stackit_argus_instance.example
to = stackit_observability_instance.example
}
resource "stackit_observability_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
plan_name = "Monitoring-Medium-EU01"
acl = ["1.1.1.1/32", "2.2.2.2/32"]
metrics_retention_days = 7
metrics_retention_days_5m_downsampling = 30
metrics_retention_days_1h_downsampling = 365
}
` + "```" + "\n"