-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: API Gateway cache key parameters unset during apply #29910
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Seems to be same issue raised here last July. |
ok, I've done some analysis on this and below is what causes the issue from what I have observed,
Proposed fix
If the analysis and proposed fix approach can be confirmed, happy to work/collaborate on a PR to address |
This functionality has been released in v4.59.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.3.9
AWS Provider Version
4.55.0
Affected Resource(s)
aws_api_gateway_method
aws_api_gateway_integration
Expected Behavior
When adding a new request_parameters to and existing aws_api_gateway_method and adding the same value to an existing array of cache_key_parameters for the associated aws_api_gateway_integration any existing cache key parameters should be left in place with the additional value added to the array of cache_key_parameters.
Actual Behavior
On adding a header to an API Gateway request method resource and adding it to the list of cache key parameters to the integration request resource, exiting cache key parameters on the integration request were removed once the changes were applied.
The plan indicated it would add the request header / cache key parameters and leave the remaining x unchanged but what it actually did was overwrite the existing cache key parameters with the single, newly added cache key parameter.
After the apply had completed, re-running our CI pipeline using the same code tag resulted in a different plan, this time it showed that it would add the original cache keys leaving the 1 unchanged. On apply, everything was correct and all cache key parameters were set as expected based on the terraform code.
The period of time during which the original cache key parameter were unset presented a significant security risk.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Not provided due confidentiality concerns.
Steps to Reproduce
With and existing deployed and functional API gateway resource that has at least 1 aws_api_gateway_method and associated aws_api_gateway_integration resource, each containing request parameters that also exist in the cache key parameters array of the integration request.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: