Are manual changes to an aws IAM policy detected by Terraform plan?
Yes, Terraform will detect drift in IAM policies.
Here is my starting point, a policy that allows full S3 and SQS access to specific resources.
data &quot;aws_iam_policy_document&quot; &quot;task&quot; {
  statement {
    effect  = &quot;Allow&quot;
    actions = [&quot;sqs:*&quot;]
    resources = [
      aws_sqs_queue.my-queue.arn
    ]
  }

  statement {
    effect  = &quot;Allow&quot;
    actions = [&quot;s3:*&quot;]
    resources = [
      &quot;${aws_s3_bucket.my_bucket.arn}&quot;,
      &quot;${aws_s3_bucket.my_bucket.arn}/*&quot;,
    ]
  }
}

resource &quot;aws_iam_policy&quot; &quot;task_role&quot; {
  name   = &quot;my-task-policy&quot;
  policy = data.aws_iam_policy_document.task.json
}

I then manually added ec2:DescribeInstances to this policy via the AWS management console.
To test whether it was detected or not, I ran terraform apply -target aws_iam_policy.task_role
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_iam_policy.task_role will be updated in-place
  ~ resource &quot;aws_iam_policy&quot; &quot;task_role&quot; {
        arn    = &quot;arn:aws:iam::111111111111:policy/my-task-policy&quot;
        id     = &quot;arn:aws:iam::111111111111:policy/my-task-policy&quot;
        name   = &quot;my-task-policy&quot;
        path   = &quot;/&quot;
      ~ policy = jsonencode(
          ~ {
              ~ Statement = [
                  ... REDACTED...
                  - {
                      - Action   = &quot;ec2:DescribeInstances&quot;
                      - Effect   = &quot;Allow&quot;
                      - Resource = &quot;*&quot;
                      - Sid      = &quot;VisualEditor0&quot;
                    },
                ]
                Version   = &quot;2012-10-17&quot;
            }
        )
    }

Plan: 0 to add, 1 to change, 0 to destroy.

So Terraform correctly detected the drift.