https://pulumi.com logo
#automation-api
Title
# automation-api
b

bright-dawn-60437

07/13/2021, 5:57 PM
More concretely - I am creating a ASG based on a name that a user provides. For the same stack, for new names, I want to create additional ASGs
r

red-match-15116

07/13/2021, 6:20 PM
I guess you could loop over ASG creation, pass in an array of names as a config value and that would let you do something like this.
b

bright-dawn-60437

07/13/2021, 6:21 PM
Yeah, but the names will be [“name1”] in first run and [“name2"] in second run. Which I need to handle as [“name1”, “name2"]
Guess a better question is - is it possible to do what I want to do as multiple stack, but be able to list all the stack that I create this way?
One option seems to be tags, is it possible to list stacks by tags?
r

red-match-15116

07/13/2021, 6:22 PM
Yes, my suggestion would be to always create a new stack.
You can keep all such stacks in one specific project. Or you could name the stacks in a way that has this information.
asg-name1
,
asg-name2
, etc.
Listing stacks by tag is not possible currently via automation api
b

bright-dawn-60437

07/13/2021, 6:25 PM
Could you point me at how I can get all stack in a project? Last I checked (might have done it wrongly), it needed both stack name and project name. Using the python sdk
b

bright-dawn-60437

07/13/2021, 6:27 PM
Got it, thanks a lot. Will try this way!
👍🏽 1