Skip to content

Commit

Permalink
Add hash of swagger file contents to API Gateway deployment to ensure…
Browse files Browse the repository at this point in the history
… updates

Without this, the deployment resource does not necessarily know that the
swagger file has been updated and will not deploy the updated API.
  • Loading branch information
ryandub committed Nov 1, 2017
1 parent 95312d8 commit 1d6f956
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/apigateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ resource "aws_api_gateway_deployment" "stage" {

rest_api_id = "${aws_api_gateway_rest_api.api.id}"
stage_name = "${var.stage}"

variables = {
"version" = "${md5(data.template_file.swagger_file.rendered)}"
}

}

data "aws_acm_certificate" "ssl_cert" {
Expand Down

0 comments on commit 1d6f956

Please sign in to comment.