title: Terraform - response_parameters: should be a map
body: <p>I have a terraform script for <code>api_gateway</code> which is working fine. I have a lot of templates duplicated. I want to extract all the templates using <code>"data" "template_file"</code>. </p>
  
  <p>Working solution:</p>
  
  <pre><code>resource "aws_api_gateway_integration_response" "ApiResponse" {
     //something goes here
       response_parameters  = {
          "method.response.header.Access-Control-Allow-Headers" = "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'"
          "method.response.header.Access-Control-Allow-Methods" = "'GET,DELETE,PUT,OPTIONS'"
          "method.response.header.Access-Control-Allow-Origin" = "'*'"
        }
  }
  </code></pre>
  
  <p>After refactoring:</p>
  
  <pre><code>resource "aws_api_gateway_integration_response" "ApiResponse" {
     //something goes here
       response_parameters = "${data.template_file.response_parameters.template}"
  }
  
  data "template_file" "response_parameters" {
     template = "${file("${path.module}/response_parameters.tptl")}"
  }
  </code></pre>
  
  <p>response_parameters.tptl:</p>
  
  <pre><code>{
      "method.response.header.Access-Control-Allow-Headers" = "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'"
      "method.response.header.Access-Control-Allow-Methods" = "'GET,DELETE,PUT,OPTIONS'"
      "method.response.header.Access-Control-Allow-Origin" = "'*'"
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>* aws_api_gateway_integration_response.ApiResponse: response_parameters: should be a map
  </code></pre>
  
  <p>Since the response parameters are common for all my <code>aws_api_gateway_integration_response</code>, i want to have a common template and reuse in all resources. </p>
  
  <p>Why am i getting this error?</p>