Tf aws provider cannot assume role

In my aws account, I have created a role that has a policy attached to it, and the trusted policy allows my iam user to assume it. From the CLI I am able to run the sts assume-role command. However, the tf aws provider complains saying IAM role cannot be assumed.