https://pulumi.com logo
#golang
Title
# golang
i

icy-helmet-84765

12/07/2020, 4:17 PM
I'm relatively new to pulumi and am having a bit of a hard time figuring out how to add a validation step to my infrastructure build out. What I am interested in doing is: 1. Build a VM via pulumi 2. Add DNS records via pulumi 3. Validate the DNS records have propagated via SOA & a few more things (I have code for this already, but am not sure how to tie it to the pulumi flow engine) 4. Add a final DNS record via pulumi It seemed to be
dynamic providers
but that isn't supported by golang with the docs on the site. Any pointers on how to add step 3 via golang?
l

lemon-agent-27707

12/07/2020, 6:08 PM
Have you taken a look at Automation API? https://www.pulumi.com/blog/automation-api/ You could probably achieve this by doing a two part update. 1.
stack.up
using a program that does 1-2 2. plain go code that does (3) 3.
stack.up
using a program that does (1,2,4).
i

icy-helmet-84765

12/08/2020, 1:03 AM
I've looked at it a bit. While that could work, it largely defeats the simplicity of what pulumi appears to offer & results in 3 programs and state outside pulumi I need to mange to know which program to call... seems complex at best. Maybe I need to write providers that I can depend on for the transitions. I was hoping that this seeming common pattern of validation steps against a resource would be easy.
@lemon-agent-27707 should I use a custom provider to be able to inject something like what I'm wanting? Has anyone written anything like the before I try it?
I just realized when talking with a co-worker that maybe there is an opportunity for a generic provider that could take the custom logic code and provide a "user defined validation" pattern .... thoughts?
l

lemon-agent-27707

12/08/2020, 9:46 PM
I don't believe anyone in the community has tried to write a native pulumi provider. Might be good to put some notes about your use case in here: https://github.com/pulumi/pulumi/issues/3825
👍 1
4 Views