Skip to content

Instantly share code, notes, and snippets.

@DanielDaCosta
Created June 20, 2020 18:18
Show Gist options
  • Select an option

  • Save DanielDaCosta/7697c8f8751bc64d95abb770dfb79eab to your computer and use it in GitHub Desktop.

Select an option

Save DanielDaCosta/7697c8f8751bc64d95abb770dfb79eab to your computer and use it in GitHub Desktop.
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