Skip to content

Instantly share code, notes, and snippets.

@abdus
Last active October 25, 2023 15:05
Show Gist options
  • Save abdus/f659dd160549b9d9d6feeee6b872d24c to your computer and use it in GitHub Desktop.
Save abdus/f659dd160549b9d9d6feeee6b872d24c to your computer and use it in GitHub Desktop.
Provision API Gateway Resources
# blog: https://sysdown.co/devops/terraform-lambda-ag-deployment/
resource "aws_api_gateway_resource" "lambda_api_gateway_proxy" {
rest_api_id = aws_api_gateway_rest_api.lambda_api_gateway.id
parent_id = aws_api_gateway_rest_api.lambda_api_gateway.root_resource_id
path_part = "{proxy+}"
}
resource "aws_api_gateway_method" "lambda_api_gateway_method" {
rest_api_id = aws_api_gateway_rest_api.lambda_api_gateway.id
resource_id = aws_api_gateway_resource.lambda_api_gateway_proxy.id
http_method = "ANY"
authorization = "NONE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment