Description
Proposal:
Provide a command line option for the influx stacks update
command that allows you to remove and/or stop tracking an individual task, dashboard, alert, etc.
Current behavior:
As it stands, it is possible to add a resource to an influx stack by running influx stacks update --addResource
, but there is no way to remove a resource without deleting the entire stack, along with all of its resources. If a user deletes a dashboard/task/alert in the UI that was part of a stack, running influx export
on the stack (or running stack pull
if using the stack
command line utility) will fail with the following error message:
Error: Failed to clone resource: resource_id=<id-of-the-deleted-resource> resource_kind=<resource-type> err="cloning resource: finding resource labels: <resource-type> not found".
See 'influx export -h' for help
Desired behavior:
Remove an individual dashboard/task/alert/whatever from a stack. Something analogous to the --addResource
option, but... ya know, in reverse?
Additionally, find a way to gracefully handle the situation that arises when a resource is part of a stack, but is deleted via the UI.
Alternatives considered:
Eating my computer out of frustration
If you have already saved the desired state of a stack (as can be done via stack pull
), you can use stack push
to overwrite the stack and get everything back into sync.
Use case:
Query team has a lot of old, deprecated dashboards/tasks/alerts that are tracked via stacks. We would like a cleaner way to remove them.