:wave: Has anyone run into an issue when trying to...
# automation-api
g
👋 Has anyone run into an issue when trying to create an API gateway on AWS with the automation API + Pulumi crosswalk? When I run the script, it errors every time. I posted more details (and code) here: https://github.com/pulumi/pulumi/issues/6162 If anyone else has run into this, would appreciate some guidance.
b
This might be an awsx / automation api thing (although I've not seen this yet). I'm just trying something else to see if it's an apigateway thing or not. (I did try running your code outside of automation api and that worked) Another thing to try is to move the pulumi program part of the code to outside the automation api code (something like this)
g
Thanks, @brave-planet-10645. It does run successfully outside of the automation API script - yes. I'll try moving the Pulumi program part out of the automation code and see how that goes
b
You can still run integration tests (the github link above has an example where the pulumi code is outside of the automation api code) and it gives an example of how you can test it
It does look like a bug though so leave the issue open
👍 1
g
Cool. So you're basically doing the same things, but just not using the
pulumiProgram
to do it. Instead you're referencing the stack inside the
infrastructure
folder and then standing up the infra. Am I following?
b
yes
g
Awesome - trying now. Thank you!
b
that's correct... it's running it as a
LocalProgram
rather than an
InlineProgram
(bear in mind, I don't 100% know if you'll run into the same issue or not, but it might work)
And at least you can get your infra set up and then reference the pulumi program in the automation api code later on
In fact, you can use the pulumi program to do the heavy lifting of the infrastructure management and use the automation api to run the tests
1
g
To circle back on this - it does work using that structure you provided. Thanks for that! That let's us move forward at least until the automation api bug is addressed.
b
Great to hear. Do you mind updating the issue you created with these details (as in how it worked when you used a LocalProgram rather than an InlineProgram) as that'll help my colleagues get to the bottom of this a lot quicker
g
Absolutely - will do!
b
Thank you
👍 1
l
Responded on the issue but I believe this is a known bug with a workaround: https://github.com/pulumi/pulumi/issues/6162#issuecomment-764787396 Would you mind giving that a go? We do have work planned to address this in the near future.
b
Thanks Evan
g
@lemon-agent-27707 Thanks, Evan -- we'll give that a go and let you know how it goes.