For system, network and cloud administrators

How to fix AWS EC2 error “No default VPC for this user” in Terraform

Sometimes, when trying to create an AWS EC2 instance in Terraform, you might come across an error similar to:

Error: creating EC2 Instance: VPCIdNotSpecified: No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC.