Skip to content

Commit

Permalink
Merge pull request #2 from Thinkei/add-depend-policy
Browse files Browse the repository at this point in the history
Include REST API resource policy to the redeployment trigger
  • Loading branch information
tungvuson authored Jun 6, 2024
2 parents 08413d4 + b2e4d48 commit f05b989
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ resource "aws_api_gateway_deployment" "this" {
rest_api_id = aws_api_gateway_rest_api.this[0].id

triggers = {
redeployment = sha1(jsonencode(aws_api_gateway_rest_api.this[0].body))
redeployment = sha1(jsonencode([
aws_api_gateway_rest_api.this[0].body,
local.create_rest_api_policy ? var.rest_api_policy : ""
]))
}

lifecycle {
Expand Down

0 comments on commit f05b989

Please sign in to comment.