I am trying to attach an existing role created in AWS, but I am not able to add it in Terraform Code. I tried to add the role in instance profile but it didn't work either for me.
Is there any direct way to add it in the resource in Terraform Code ?
iam_instance_profile = "my-role"
Note: my-role is having the full access of ec2.