Open dleavitt opened 2 years ago
Hi folks. Any plan to release the fix? This bug is blocking our deployment. Do you have any workaround to fix the issue?
hello Folks, I am also stuck with this issue, do we have any workarounds?? Thanks!!
Have same problem here
This problem still exists. We recreate integrations when encountering this issue instead of simply updating them.
@justinretzolk Apologies for the @ but wondering if there's any planned resolution for this or suggested workaround? As it stands, it seems to make the aws_apigatewayv2_integration
resource completely unusable with SQS or other services needing request_parameters
.
I can try to put together a fix with a bit of direction. As @dleavitt originally noted, the issue seems to be around the use of HasChange("request_parameters")
. Is it a satisfactory fix to change this conditional to always submit request_parameters
if they are present? Is there any precedent / example code of a resource doing similar elsewhere?
The relevant code block now seems to be https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/apigatewayv2/integration.go#L335-L354
Also having the same problem, but with Kinesis integration
Still present for SQS
Same issue here, now with Step function
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
aws_apigatewayv2_integration
-request_parameters
specificallyTerraform Configuration Files
Relevant snippet attached here, full Terraform config for reproduction attached below.
Debug Output
Here's the relevant part of the debug output after successfully applying, updating
aws_apigatewayv2_integration.main.description
and attempting to apply again:https://gist.github.com/dleavitt/8d5abb1e3fb9bcbb429447b667ce8f5f
Expected Behavior
terraform apply
should succeed.Specifically, terraform should pass the two values in
request_parameters
:QueueUrl
andMessageBody
, even though they haven't changed.Actual Behavior
Terraform does not pass these two values, so updating the resource fails with the following error:
Steps to Reproduce
terraform apply
. It should succeed.aws_apigatewayv2_integration.main
other thanrequest_parameters
. I changed thedescription
from "SQS Repro Test" to "SQS Repro Test!".terraform apply
.Changing either of
QueueUrl
orMessageBody
will force TF to resend all request parameters and will cause step 3 to succeed per #15894References
Partially fixed by #15894
The above fixes the issue only when other request parameters change. However, if other attributes of the integration change but the request parameters don't, the request parameters won't be passed.
Specifically, this conditional seems incorrect; all request parameters need to be passed any time the resource is updated:
https://github.com/hashicorp/terraform-provider-aws/blob/3c1fd63d8e058f05beecbac4c70b52877d8a5eb6/internal/service/apigatewayv2/integration.go#L328
Full Terraform Config File