Enabling CloudFront on API Gateway component #3
-
ApiGateway can also create a CF:Distribution, but I haven't been able to figure out how to cause that in the test harness. I've only found it occurring where plugins are used. Is that the only situation or is there something simpler that I can use to try and create a testcase for it? I found I could add CloudFront: {} from state.ftl into apigateway, but that then gave me the following error
I've seen x-api-key as part of the swagger spec, so I've tried adding it in the definitions param of loadModule, but without success. When you have some time, can I get you to help me with this as well as the above? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Looking through the setup for the APIGateway and it looks like the x-api-key value is provided through a setting The getOccurrenceSettingValue function takes an array of setting keys and then creates merged settings keys that the function looks for. So for the API Key it will look for the following setting being available for the occurrence
So setting one of these should fix up the error |
Beta Was this translation helpful? Give feedback.
Looking through the setup for the APIGateway and it looks like the x-api-key value is provided through a setting
https://github.com/roleyfoley/engine-plugin-aws/blob/a5e95e9972c63c3d28eab027f4e2ffcec830f4d0/aws/components/apigateway/setup.ftl
The getOccurrenceSettingValue function takes an array of setting keys and then creates merged settings keys that the function looks for. So for the API Key it will look for the following setting being available for the occurrence
So setting one of these should fix up the error