Skip to content

Instantly share code, notes, and snippets.

@Mirch
Created January 25, 2022 20:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mirch/2b12650cd4a4ec3e4ddff4c6f6d4b8fb to your computer and use it in GitHub Desktop.
Save Mirch/2b12650cd4a4ec3e4ddff4c6f6d4b8fb to your computer and use it in GitHub Desktop.
resource "aws_apigatewayv2_deployment" "api_deployment" {
api_id = aws_apigatewayv2_api.users_api.id
description = "API deployment"
triggers = {
redeployment = sha1(join(",", [
jsonencode(aws_apigatewayv2_integration.get_user_integration),
jsonencode(aws_apigatewayv2_route.get_user_route),
jsonencode(aws_apigatewayv2_integration.create_user_integration),
jsonencode(aws_apigatewayv2_route.create_user_route),
jsonencode(aws_apigatewayv2_integration.update_user_integration),
jsonencode(aws_apigatewayv2_route.update_user_route),
jsonencode(aws_apigatewayv2_integration.delete_user_integration),
jsonencode(aws_apigatewayv2_route.delete_user_route)
],
))
}
lifecycle {
create_before_destroy = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment