Created
June 20, 2020 18:18
-
-
Save DanielDaCosta/7697c8f8751bc64d95abb770dfb79eab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "aws_api_gateway_deployment" "api" { | |
| rest_api_id = aws_api_gateway_rest_api.apiGateway.id | |
| stage_name = var.environment | |
| depends_on = [ | |
| aws_api_gateway_integration.api, | |
| ] | |
| # Redeploy when there are new updates | |
| triggers = { | |
| redeployment = sha1(join(",", list( | |
| jsonencode(aws_api_gateway_integration.api), | |
| ))) | |
| } | |
| lifecycle { | |
| create_before_destroy = true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment