terraform-aws-modules / terraform-aws-apigateway-v2

Terraform module to create AWS API Gateway v2 (HTTP/WebSocket) 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/apigateway-v2/aws
Apache License 2.0
144 stars 187 forks source link

Deployment not triggered on changes of body #109

Open schammah opened 3 days ago

schammah commented 3 days ago

Is your request related to a problem? Please describe.

The module doesn't trigger a deployment when a change is done to body for example when using openapi.yml spec

Describe the solution you'd like.

re trigger deployment when a change to that is done i.e. replace these lines with

triggers = {
    redeployment = sha1(join(",", tolist([
      jsonencode(aws_apigatewayv2_integration.this),
      jsonencode(aws_apigatewayv2_route.this),
      jsonencode(aws_apigatewayv2_route_response.this),
      jsonencode(aws_apigatewayv2_api.this[0].body),
    ])))
  } 

EDIT: Actually tested this solution but it still didnt trigger deployment on a change in openapi spec

Additional context

issue was mentioned in several issues on provider i.e. #14445