title: terraform import throws "Index value required" error for a string key value
body: <p>This is what it would look like in the state file if it is created from the scratch by terraform:</p>
  
  <pre><code>{
    "module": "module.rds",
    "mode": "managed",
    "type": "aws_cloudwatch_log_subscription_filter",
    "name": "rds_logs_delivery",
    "each": "map",
    "provider": "provider.aws",
    "instances": [
      {
        "index_key": "prod-service-master.audit",
        "schema_version": 0,
        "attributes": {
          "destination_arn": "arn:aws:firehose:us-east-5:9999999999:deliverystream/prod-rds-logs",
          "distribution": "ByLogStream",
          "filter_pattern": "",
          "id": "cwlsf-9999999999",
          "log_group_name": "/aws/rds/instance/prod-service-master/audit",
          "name": "rds-logs-delivery-prod-service-master",
          "role_arn": "arn:aws:iam::9999999999:role/cloudwatch-logs-to-kinesis"
        },
        "private": "abcdefg",
        "depends_on": [
          "data.aws_caller_identity.current",
          "data.aws_partition.current",
          "data.terraform_remote_state.kinesis_delivery_stream"
        ]
      },
  </code></pre>
  
  <p>For some reasons I need to import this into another tf state file. So I ran this command:</p>
  
  <pre><code> terraform import module.rds.aws_cloudwatch_log_subscription_filter.rds_logs_delivery["prod-service-reports.audit"] rds-logs-delivery-prod-service-master
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>Error: Index value required
  
    on &lt;import-address&gt; line 1:
     1: module.rds.aws_cloudwatch_log_subscription_filter.rds_logs_delivery[prod-service-reports.audit]
  
  Index brackets must contain either a literal number or a literal string.
  </code></pre>
  
  <p>How can I fix it? I have tried </p>
  
  <ol>
  <li>replace double quote with single quote, and </li>
  <li>no quote</li>
  </ol>
  
  <p>but I still get the same error.</p>