From d95b2d6ec90c41c56e473a28c91e71cac9fbb1ec Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 18 Jun 2020 16:40:21 -0600 Subject: [PATCH] added filter flag to influx apply cmd, resolves #1117 --- content/v2.0/reference/cli/influx/apply/_index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/v2.0/reference/cli/influx/apply/_index.md b/content/v2.0/reference/cli/influx/apply/_index.md index 2d35e4d7f..c351d494d 100644 --- a/content/v2.0/reference/cli/influx/apply/_index.md +++ b/content/v2.0/reference/cli/influx/apply/_index.md @@ -31,6 +31,7 @@ influx apply [flags] | `-e` | `--encoding` | Encoding of the input stream | string | | | | `--env-ref` | Environment references to provide with the template (format: `--env-ref=REF_KEY=REF_VALUE`) | string | | | `-f` | `--file` | Path to template file | string | | +| | `--filter` | Resources to skip when applying the template (filter by `kind` or `resource`) | string | | | | `--force` | Ignore warnings about destructive changes | | | | `-h` | `--help` | Help for the `apply` command | | | | | `--json` | Output data as JSON | | `INFLUX_OUTPUT_JSON` | @@ -78,4 +79,16 @@ influx apply \ -f path/to/template.yml -f path/to/templates_directory -u https://example.com/template.json + +# Apply a template, but skip resources. The following example skips all buckets +# and the dashboard whose metadata.name field matches "example-dashboard". + +# Filter format: +# --filter=kind=Bucket +# --filter=resource=Label:$Label_TMPL_NAME + +influx apply \ + -f path/to/template.yml \ + --filter kind=Bucket \ + --filter resource=Dashboard:example-dashboard ```