Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save DanielDaCosta/bd84eafebfe5b97fdd00e837149455ec to your computer and use it in GitHub Desktop.
resource "aws_api_gateway_rest_api" "apiGateway" {
name = "api-gateway-SQS"
description = "POST records to SQS queue"
}
resource "aws_api_gateway_resource" "form_score" {
rest_api_id = aws_api_gateway_rest_api.apiGateway.id
parent_id = aws_api_gateway_rest_api.apiGateway.root_resource_id
path_part = "form-score"
}
resource "aws_api_gateway_request_validator" "validator_query" {
name = "queryValidator"
rest_api_id = aws_api_gateway_rest_api.apiGateway.id
validate_request_body = false
validate_request_parameters = true
}
resource "aws_api_gateway_method" "method_form_score" {
rest_api_id = aws_api_gateway_rest_api.apiGateway.id
resource_id = aws_api_gateway_resource.form_score.id
http_method = "POST"
authorization = "NONE"
request_parameters = {
"method.request.path.proxy" = false
"method.request.querystring.unity" = true
}
request_validator_id = aws_api_gateway_request_validator.validator_query.id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment