【发布时间】:2016-07-18 13:42:15
【问题描述】:
我在 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_api_gateway_integration_response.post_pet_200_integration: : 无效或未知键:response_parameters
关于aws_api_gateway_integration_response 的文档说:
response_parameters
为什么我不能使用这个变量?
我尝试了以下方法:camelcase,带/不带 s,放入 aws_api_gateway_method_response 或 aws_api_gateway_deployment 块,放入 terraform map 变量类型而不是字符串。但我每次都有同样的错误。我也试图从这个配置中获得灵感:https://github.com/awslabs/aws-apigateway-importer,但我仍然遇到了同样的错误。
编辑: terraform 的版本是 0.6.14。
【问题讨论】:
标签: amazon-web-services aws-api-gateway terraform