https://pulumi.com logo
#general
Title
# general
d

dazzling-grass-65770

09/27/2021, 8:37 PM
Hello there, just thinking out loud, anyone ever tried to pulumi pulumi, i.e. use the automation api in a resource provider, so that pulumi stacks can be up'd with a pulumi program ? automation api programs can look fine, I guess, but they seem to "go back" to 'imperative' mode while pulumi trained us to love to create stuff with real programming languages with declarative thinking.
b

billowy-army-68599

09/27/2021, 8:41 PM
this sounds interesting, but not sure what the benefit would be over a standard pulumi program with a component?
b

bored-oyster-3147

09/27/2021, 8:42 PM
Talking about something like this? https://github.com/pulumi/pulumi/issues/2209
🙌 1
❤️ 1
d

dazzling-grass-65770

09/27/2021, 8:44 PM
only for chicken-egg things, when the output of a stack is needed to get into the input of another stack, https://github.com/pulumi/pulumi/issues/3021
one solution is an automation api thing there https://github.com/pulumi/pulumitv/tree/master/modern-infrastructure-wednesday/2020-10-21, but it feels weird to abandon all that the pulumi cli does. stacks as resources. nice find with that issue @bored-oyster-3147 thanks
b

bored-oyster-3147

09/27/2021, 8:54 PM
Automation API is definitely the current way to do this, and has the benefit of not needing to jump the technical hurdle of having a pulumi deployment within a pulumi deployment. The provider for those stacks-as-resources will need to be able to reach out to pulumi host to kick of deployment independently, which sounds eerily similar to some of the features recently announced in the new Pulumi REST API.... so hopefully we see progress on that at some point because I agree that it would be useful for stack references. Would be nice if that provider implementation could spin up separate console hosts to run those nested deployments and not need the REST API
b

billowy-army-68599

09/27/2021, 8:54 PM
I have long wanted to build a ci/cd tool with the automation API that is able to resolve stack references, similar t something like terraform's atlantis project
👀 1
even something simple like a configuration file:
Copy code
my-stack
  dependencies:
     - stack-a
     - stack-b
then the automation api runs them in order, would be a good start
l

little-cartoon-10569

09/27/2021, 9:01 PM
IoC is made for this. Try nest.js?
d

dazzling-grass-65770

09/29/2021, 7:13 AM
yeah you're right @bored-oyster-3147, maybe the rest api will be the key to unlock this. Thanks for the discussion, people
2 Views