Closed hitesh-goel closed 4 years ago
Are you allowed to create an instance in the region you're specifying? You might want to try another region. You might want to first create an EC2 instance manually with the same user to see whether that works.
-Edward
Yes, I am able to create an instance in the region us-west-2
using console but not using terraform in first-step
. My account is not Admin one but I have the AdministratorAccess
.
Check your ~/.aws/ directory. Maybe you have other credentials still configured. Also make sure to have changed provider.tf to deploy in us-west-2 instead of eu-west-1
Found the error: Root cause was my AWS account was enabled with MFA and to instantiate the EC2 instance it requires MFA. Due to not valid configuration of MFA. I was not able to instantiate the EC2.
Thanks for all the help. Closing this issue.
$ terraform apply
the user i am using has Administrator access. Still, i am getting this error. What's the issue?