Before going any further, to gain an extra layer of protection for your cloud, we recommend you enable multi-factor authentication for all of your users. In addition to something they know, users are required to provide something they have (a token). In combination with a fingerprint scanner on a smartphone (something they have), MFA lessens the probability of compromised credentials.
Terraform is unable to set up MFA, but you can do it in the console or with the AWS CLI using the following command:
aws iam enable-mfa-device --user-name <value> --serial-number <value> --authentication-code1 <value> --authentication-code2 <value> [--cli-input-json <value>] [--generate-cli-skeleton <value>]
We are not going to automate this as the values must be obtained from a physical device in most cases.
The supported device list...