boundary
boundary copied to clipboard
feat(cli): add/set/remove worker tags
example commands:
adding key with multiple values, adding multiple keys:
bin/boundary workers add-worker-tags -id w_1234567890 -tag key=val1,val2 -tag key2=val
Worker information: Active Connection Count: 0 Address: 127.0.0.1:9202 Created Time: Mon, 25 Jul 2022 10:03:39 PDT ID: w_1234567890 Last Status Time: 2022-07-25 19:41:09.485499 +0000 UTC Type: pki Updated Time: Mon, 25 Jul 2022 12:41:09 PDT Version: 2
Scope: ID: global Name: global Type: global
Tags: Configuration: type: ["dev" "local"] Api: key: ["val1" "val2"] key2: ["val"] Canonical: key: ["val1" "val2"] key2: ["val"] type: ["dev" "local"]
removing a single tag:
bin/boundary workers remove-worker-tags -id w_1234567890 -tag key=val1
Tags: Configuration: type: ["dev" "local"] Api: key: ["val2"] key2: ["val"] Canonical: key: ["val2"] key2: ["val"] type: ["dev" "local"]
setting all tags to nil:
bin/boundary workers set-worker-tags -id w_1234567890 -tag null
Tags: Configuration: type: ["dev" "local"] Canonical: type: ["dev" "local"]
just the string parsing/initial flag stuff for now
Can you add the new commands to internal/cmd/commands.go?
And the following in internal/cmd/gencli/input.go
VersionedActions: []string{"update", "add-worker-tags", "set-worker-tags", "remove-worker-tags"},
Looks like we're going to hold off on merging this until @jefferai is back and can take a look