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

helpful-ice-5738

02/08/2019, 10:26 PM
Is there a way to pass apigateway.Method arguments to apigateway.x.API()? I am having a hard time tracking
apiKeyRequired
and use of apigateway.Method at all (I have an apikey, usageplan, and usageplankey)
w

white-balloon-205

02/08/2019, 11:35 PM
There is not currently. We will ideally add 1st class support for API keys to
API
. In the meantime, if you need to use those you may need to either create the individual resources directly, or use the overload of the constructor that allows passing an OpenAPI Json spec, which would I believe let you embed API key and other details. Cc also @lemon-spoon-91807.
h

helpful-ice-5738

02/09/2019, 12:13 AM
I moved into doing it separately and setting up Integration has been causing lots of issues — I used
Copy code
const demo_lambda_uri = pulumi.interpolate
    `arn:aws:apigateway:${config.region}:lambda:path/2015-03-31/functions/${demo_lambda.arn}/invocations`;
to get a uri to pass to Integration… and I consistnetly get the AWS error`Invalid ARN specified in the request`
(my arn for my lambda does not have any wacky characters and I believe I am following what’s in the docs for
.Integration
)
l

lemon-spoon-91807

02/09/2019, 12:14 AM
does that uri work if you were to manually do this through the aws console?
h

helpful-ice-5738

02/09/2019, 12:19 AM
yep 😕 maybe config.region isn’t returning. I will let you know
l

lemon-spoon-91807

02/09/2019, 12:20 AM
let me rephrase 🙂 do you know the final value being produced for demo_lambda_uri ? if you try to use that value yourself from the aws console do you get the same issue?
h

helpful-ice-5738

02/09/2019, 12:33 AM
I’m gonna kill my stack and clena up config cause that value isn’t coming through properly 🙂 sorry for bothering you!
l

lemon-spoon-91807

02/09/2019, 12:33 AM
no bother at all!
hopefully this isn't too frustrating
h

helpful-ice-5738

02/09/2019, 12:40 AM
it’s been ok - I appreciate the team’s support! this one is resolved (the namespaces setup in config wasn’t clear to me in the docs, but now I appreciate it)