title: Terraform : Expected an attribute value, introduced by an equals sign ("=")
body: <p>I'm working on a terraform script which integrates API Gateway to DynamoDB using HTTPS/POST request. The basic objective is to insert the records that are passed in the API request body in the DynamoDB table.
  I'm using aws_api_gateway_integration to define the integration and there I'm passing the request template which should include two attributes(<strong>BusinessUnitId</strong> and <strong>Frequency</strong>).My script looks like this -</p>
  <pre><code>resource aws_api_gateway_integration schedule_post_integration {
    rest_api_id             = aws_api_gateway_rest_api.schedule.id
    resource_id             = aws_api_gateway_resource.schedule_resource.id
    http_method             = aws_api_gateway_method.schedule_post_method.http_method
    type                    = &quot;AWS&quot;
    integration_http_method = &quot;POST&quot;
    uri                     = &quot;arn:aws:apigateway:${var.target_region}:dynamodb:action/PutItem&quot;
    credentials             = aws_iam_role.schedule_api_dynamodb_role.arn
    request_templates       = {
      &quot;application/json&quot; = EOF
      {
          &quot;TableName&quot; : &quot;${var.environment_id}-AccountService-NotesToDatalakeSchedule&quot;,
          &quot;Item&quot; : {
              &quot;BusinessUnitId&quot; : {
                  &quot;N&quot; : &quot;$input.path('$.BusinessUnitId')&quot;
              },
              &quot;Frequency&quot; : {
                  &quot;N&quot; : &quot;$input.path('$.Frequency')&quot;
              }
          }
      }
    }
  }
  </code></pre>
  <p>I couldn't find a proper syntax indicating how the <strong>Item</strong> should be passed in the request_templates. During deployment it throws the error -</p>
  <pre><code>2022-09-12T11:51:22.6623262Z ##[error][1m[31mError: [0m[0m[1mMissing attribute value[0m
  2022-09-12T11:51:22.6626316Z ##[error][0m  on api-gateway.tf line 47, in resource &quot;aws_api_gateway_integration&quot; &quot;schedule_post_integration&quot;:
  2022-09-12T11:51:22.6628770Z ##[error]  35:   request_templates       = {
  2022-09-12T11:51:22.6630845Z ##[error]  36:     &quot;application/json&quot; = EOF
  2022-09-12T11:51:22.6632935Z ##[error]  37:     {
  2022-09-12T11:51:22.6636136Z ##[error]  38:         &quot;TableName&quot; : &quot;${var.environment_id}-AccountService-NotesToDatalakeSchedule&quot;,
  2022-09-12T11:51:22.6638305Z ##[error]  39:         &quot;Item&quot; : {
  2022-09-12T11:51:22.6642274Z ##[error]  40:             &quot;BusinessUnitId&quot; : {
  2022-09-12T11:51:22.6645424Z ##[error]  41:                 &quot;N&quot; : &quot;$input.path('$.BusinessUnitId')&quot;
  2022-09-12T11:51:22.6647529Z ##[error]  42:             },
  2022-09-12T11:51:22.6649461Z ##[error]  43:             &quot;Frequency&quot; : {
  2022-09-12T11:51:22.6651639Z ##[error]  44:                 &quot;N&quot; : &quot;$input.path('$.Frequency')&quot;
  2022-09-12T11:51:22.6653642Z ##[error]  45:             }
  2022-09-12T11:51:22.6655505Z ##[error]  46:         }
  2022-09-12T11:51:22.6657282Z ##[error]  47:     }
  2022-09-12T11:51:22.6659045Z ##[error]  48:   }
  2022-09-12T11:51:22.6661277Z ##[error]Expected an attribute value, introduced by an equals sign (&quot;=&quot;).
  </code></pre>
  <p>Can someone help me identifying the issue here?</p>