-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching on API Gateway does not work for path parameters #856
Comments
Enabling caching does not properly work even for very simple use cases (such as when having path parameters or query strings). So, IMHO I would not say this is just an "enhancement." We have created a pull request to fix this issue. Hopefully it can make it into the next release :) |
Hi @betabandido As your PR was merged, and mine about the documentation will be too soon I hope, could you tell me if you are still having this issue or is it all resolved? Thanks! |
Oh, the issue was already fixed with the proposed PR. I suppose we just forgot to close the issue. I will do it now. Thanks for the documentation! It was on my backlog, but I couldn't find the time to do it yet. |
@betabandido No worries, thanks for your quick response :) (and cheers for the work made! 😄 ) |
I don't know if this the right place to say this, but anytime include the cache keys in the integrations resource, the enable cache check box is not enabled by default. how do I enable that checkbox with terraform? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
When enabling caching on an API that uses path parameters (or query strings) it is necessary to create a cache key for the parameter (or query string). But, Terraform currently does not seem to allow to set cache keys. If caching is enabled for a given method (something currently possible to do with Terraform), the same cached value will be returned no matter whether the path parameter value is the same or not.
In
resourceAwsApiGatewayIntegrationCreate
method the method integration is created but bothCacheKeyParameters
andCacheNamespace
are set tonil
:(see code at https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_api_gateway_integration.go#L153)
Additionally, when trying to enable caching for a path parameter in the AWS console (after an API has been created by Terraform) the operation fails. This might be related to using
nil
in thePutIntegration
call.We are working on a pull request to provide a working solution. Any help would be appreciated.
Terraform Version
Terraform v0.9.8
The issue seems to be present in the master branch too.
Affected Resource(s)
aws_api_gateway_integration
The text was updated successfully, but these errors were encountered: