https://pulumi.com logo
Title
g

gifted-terabyte-92288

01/21/2021, 3:16 PM
👋 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

brave-planet-10645

01/21/2021, 3:33 PM
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

gifted-terabyte-92288

01/21/2021, 3:38 PM
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

brave-planet-10645

01/21/2021, 3:40 PM
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

gifted-terabyte-92288

01/21/2021, 3:42 PM
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

brave-planet-10645

01/21/2021, 3:44 PM
yes
g

gifted-terabyte-92288

01/21/2021, 3:45 PM
Awesome - trying now. Thank you!
b

brave-planet-10645

01/21/2021, 3:45 PM
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

gifted-terabyte-92288

01/21/2021, 4:40 PM
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

brave-planet-10645

01/21/2021, 4:41 PM
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

gifted-terabyte-92288

01/21/2021, 4:42 PM
Absolutely - will do!
b

brave-planet-10645

01/21/2021, 4:42 PM
Thank you
👍 1
l

lemon-agent-27707

01/21/2021, 4:53 PM
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

brave-planet-10645

01/21/2021, 4:54 PM
Thanks Evan
g

gifted-terabyte-92288

01/21/2021, 4:55 PM
@lemon-agent-27707 Thanks, Evan -- we'll give that a go and let you know how it goes.