Closed dschaller closed 2 months ago
Also open to the idea of esc env tag rm
and esc env tag
update by ID both taking another argument as the tag or tag ID if it makes more sense
The tag IDs are a bit surprising. We don't typically expose IDs like this--I would have expected this to act exactly like stack tags.
infrastructure ❯ pulumi stack tag
Manage stack tags
Stacks have associated metadata in the form of tags. Each tag consists of a name
and value. The `get`, `ls`, `rm`, and `set` commands can be used to manage tags.
Some tags are automatically assigned based on the environment each time a stack
is updated.
Usage:
pulumi stack tag [command]
Available Commands:
get Get a single stack tag value
ls List all stack tags
rm Remove a stack tag
set Set a stack tag
Flags:
-h, --help help for tag
-s, --stack string The name of the stack to operate on. Defaults to the current stack
Global Flags:
--color string Colorize output. Choices are: always, never, raw, auto (default "auto")
-C, --cwd string Run pulumi as if it had been started in another directory
--disable-integrity-checking Disable integrity checking of checkpoint files
-e, --emoji Enable emojis in the output (default true)
-Q, --fully-qualify-stack-names Show fully-qualified stack names
--logflow Flow log settings to child processes (like plugins)
--logtostderr Log to stderr instead of to files
--memprofilerate int Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
--non-interactive Disable interactive mode for all commands
--profiling string Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
--tracing file: Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
-v, --verbose int Enable verbose logging (e.g., v=3); anything >3 is very verbose
Use "pulumi stack tag [command] --help" for more information about a command.
👍 I can change the behavior to mirror stack tags.
I intentionally made some tweaks to these commands vs the stack tags for a few reasons:
team
where a environment might be used by multiple teams):
) to allow for flexibility if we want to support bulk tagging from a single command@pgavlin updated these commands to more closely align with stack tags
:
) is a valid tag name character :(As an aside there is also a fix to show local time if the UTC flag is not set since most of the timestamps coming back from the server are UTC
Could you update the PR description with the new command structure? Also--while the example output is nice, it's a bit tough to parse. I think I'd prefer a brief plain-english description of what each command does to the output.
@pgavlin updated the description
add new CLI commands for CRUD operations against environment tags