According to the documentation here:
When you launch an environment using the Elastic Beanstalk console or
the EB CLI, Elastic Beanstalk creates a default instance profile,
called aws-elasticbeanstalk-ec2-role, and assigns managed policies
with default permissions to it.
Since you appear to be deploying your application through Terraform, instead of using the AWS EB CLI or Console, that role doesn't exist. You will need to create a role for your EB instances yourself.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…