Amazon web services aws\u api\u网关\u集成\u响应:无效或未知键:响应\u参数

Amazon web services aws\u api\u网关\u集成\u响应:无效或未知键:响应\u参数,amazon-web-services,aws-api-gateway,terraform,Amazon Web Services,Aws Api Gateway,Terraform,我在Terraform中有以下配置: // ... resource "aws_api_gateway_integration_response" "post_pet_200_integration" { rest_api_id = "${aws_api_gateway_rest_api.my_pets_api.id}" resource_id = "${aws_api_gateway_resource.pets_resource.id}" http_method = "${aws

我在Terraform中有以下配置:

// ...

resource "aws_api_gateway_integration_response" "post_pet_200_integration" {
  rest_api_id = "${aws_api_gateway_rest_api.my_pets_api.id}"
  resource_id = "${aws_api_gateway_resource.pets_resource.id}"
  http_method = "${aws_api_gateway_method.post_pet_method.http_method}"
  status_code = "${aws_api_gateway_method_response.post_pet_200.status_code}"

  response_parameters = "foo"
}
运行
terraform apply
时,我得到:

错误:

  • aws\u api\u网关\u集成\u响应。post\u pet\u 200\u集成:: 无效或未知密钥:响应\u参数
有关的文档说明:


响应参数我不确定这是否是terraform中的错误。我会让terraform社区对此做出回应

如果responseParameters的格式无效,或者指定的方法响应参数不存在,则API网关将引发错误

格式应如下所示:

"responseParameters": {
    "method.response.header.foo": "integration.response.header.bar"              
}
以下是相关的api参考: