【发布时间】:2022-01-12 15:49:47
【问题描述】:
我想向我的aws_api_gateway_method_response 添加一个内容类型。它应该如下所示:
我怎样才能做到这一点?使用我当前的 terraform 代码:
resource "aws_api_gateway_method_response" "response_200" {
rest_api_id = aws_api_gateway_rest_api.api.id
resource_id = aws_api_gateway_resource.api_resource.id
http_method = aws_api_gateway_method.mymethod.http_method
status_code = "200"
}
看起来像这样:
如果我将此添加到我的 method_response:
response_parameters = {
"Content-Type" = true
}
我收到一个错误:
Error: BadRequestException: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression specified: Content-Type]
在这里指定内容类型的正确方法是什么?
【问题讨论】:
标签: amazon-web-services terraform aws-api-gateway terraform-provider-aws