Join Slack
Powered by
Are there library versions of pulumi's CLI, I'd li...
# general
g
gray-elephant-37695
04/16/2019, 8:44 AM
Are there library versions of pulumi's CLI, I'd like to be able to spin up and tear down some infra as part of some tests it would be nice if the tests could call pulumi up and destroy themeselves?
s
shy-army-45455
04/16/2019, 9:03 AM
Not sure if there's a public safe to use API/SDK available, but you could always mimic what the CLI source does:
https://github.com/pulumi/pulumi/blob/master/cmd/up.go
👍 1
shy-army-45455
04/16/2019, 9:04 AM
(Assuming you're writing in Go and willing to live on the wild side)
g
gentle-diamond-70147
04/16/2019, 2:47 PM
We have some work coming soon that will make this easier (
https://github.com/pulumi/pulumi/issues/2287
), but for now you can do more-or-less how we do this with a Go test harness -
https://github.com/pulumi/pulumi/blob/master/examples/examples_test.go
.
Open in Slack
Previous
Next