Is there a way to add a tag to a stack in config? ...
# general
Is there a way to add a tag to a stack in config? I couldn’t find it in the docs, but I want something like the equivalent of
pulumi stack tag set myorg:environment prod
, but be able to put it in
in some way.
Related, if there’s a way to access it from the Automation API, that would be good too. My sense from looking at the code is that there is no such way - there’s no equivalent of setting/getting tags, or doing the equivalent of
pulumi stack ls --tag
pulumi stack tag set
pulumi stack tag ls
will let you set and list tags for a stack. But tags are a service concept, they aren't stored locally and won't work if using the filestate backend. I don't think those commands are exposed directly in the automation api, but if you raise an issue they'd probably be pretty easy to add.
you can use the
argument of
pulumi config set
pulumi config get
to manipulate config that uses your own namespacing
for instance
pulumi config set --path myorg.environment prod --stack {stackName}
would create a new
map in your config with a property
and a value of
Right, but I can't do filtering when listing stacks based on config.
@echoing-dinner-19531 there already seems to be an issue for over a year now btw 😀
Ah well up vote that then 🙂 I'm not sure where automation api currently is in priority but github votes do influence the roadmap.
Yep, I have. 😀 But it seems the only way right now to programmatically interact with tags is through the REST API.