Closed RomeroGaliza closed 1 year ago
Thank you for submitting this issue. Exactly, this behaviour of removing a service first from any status page is enforced by our API to prohibit a service from accidentally being removed from further status pages.
When removing a service from a status page in Terraform this API limitation initially does lead to problems because Terraform tries to delete the service first and then modify the status page.
This default behaviour from Terraform has to be modified here by using the lifecycle
block in the status page resource and set create_before_destroy = true
. Reference
resource "ilert_status_page" "example" {
lifecycle {
create_before_destroy = true
}
name = "example"
subdomain = "example.ilert.io"
visibility = "PUBLIC"
service {
id = ilert_service.example.id
}
service {
id = ilert_service.example2.id
}
}
This way Terraform removes the service from the status page first and then destroys the service.
If there are any more problems regarding this please reopen this issue.
Currently, to remove a service the iLert API requires that the service must be first removed from any status page. This creates a cyclic dependency when removing a service from a status page when declaring both on the same terraform plan.