Creates a deployment for an Amazon API Gateway Version 2 with redeployment triggers based on changes to the API's resources.

Terraform Template

resource "aws_apigatewayv2_deployment" "example" {
  api_id = "aws_apigatewayv2_api.example.id"
  description = "Example deployment"

  lifecycle {
    create_before_destroy = true
  }

  triggers = {
    redeployment = sha1(join(",", tolist([
 jsonencode(aws_apigatewayv2_integration.example),
 jsonencode(aws_apigatewayv2_route.example),
 ])))
  }
}