can anyone point me in the right direction for rea...
# typescript
m
can anyone point me in the right direction for reading the current stacks tags?
l
Try
pulumi stack tag ls
m
ah yeah I've seen that one, but I'm trying to read the tags from within typescript
l
You're using the automation-api?
If you're using automation-api, then you can use
automation.Stack.listTags()
.
Else you'll have to invoke
pulumi stack tag ls
.
b
If you’re not using automation api you could make a call to the REST API: https://www.pulumi.com/docs/pulumi-cloud/cloud-rest-api/#get-stack-tags
m
ok thanks I'll take a look at the automation api
is there a reason why I wouldnt want to use it?
l
No, it just requires a slight change to your project. Your entrypoint moves from being the Pulumi CLI to a normal node program, which invokes via automation-api.
m
ah, thanks!