-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-integration-responses.tf
54 lines (41 loc) · 2.19 KB
/
api-integration-responses.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
resource "aws_api_gateway_integration_response" "item_put_method-integration_response" {
rest_api_id = aws_api_gateway_rest_api.api_gateway.id
resource_id = aws_api_gateway_resource.item_resource.id
http_method = aws_api_gateway_method.item_put_method.http_method
status_code = aws_api_gateway_method_response.item_put_method_200_response.status_code
response_templates = {
"application/json" = ""
}
response_parameters = {
"method.response.header.Access-Control-Allow-Origin" = "'*'"
}
depends_on = [aws_api_gateway_method_response.item_put_method_200_response, aws_api_gateway_integration.item_put_method-api_proxy_integration]
}
resource "aws_api_gateway_integration_response" "item_get_method-integration_response" {
rest_api_id = aws_api_gateway_rest_api.api_gateway.id
resource_id = aws_api_gateway_resource.item_resource.id
http_method = aws_api_gateway_method.item_get_method.http_method
status_code = aws_api_gateway_method_response.item_get_method_200_response.status_code
response_templates = {
"application/json" = ""
}
response_parameters = {
"method.response.header.Access-Control-Allow-Origin" = "'*'"
}
depends_on = [aws_api_gateway_method_response.item_get_method_200_response, aws_api_gateway_integration.item_get_method-api_proxy_integration]
}
resource "aws_api_gateway_integration_response" "item_options_method-integration_response" {
rest_api_id = aws_api_gateway_rest_api.api_gateway.id
resource_id = aws_api_gateway_resource.item_resource.id
http_method = aws_api_gateway_method.item_options_method.http_method
status_code = aws_api_gateway_method_response.item_options_method_200_response.status_code
response_parameters = {
"method.response.header.Access-Control-Allow-Headers" = "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,x-amz-meta-fileinfo'"
"method.response.header.Access-Control-Allow-Methods" = "'GET,PUT,OPTIONS'"
"method.response.header.Access-Control-Allow-Origin" = "'*'"
}
response_templates = {
"application/json" = ""
}
depends_on = [aws_api_gateway_method_response.item_options_method_200_response, aws_api_gateway_integration.item_options_method-api_proxy_integration]
}