You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform apply should re-add IAM role to the IAM instance profile
Actual Behavior
terraform does't re-add IAM role to the IAM instance profile
Steps to Reproduce
terraform apply - this is a cold start, all resources will be created in AWS
Delete AWS role 'FakeRole1' via web-ui - simulating accident role deletion by any of users.
terraform apply - will re-create 'FakeRole1', but 'Instance Profile ARNs' will be blank - the role will not be attached to the initial 'FakeInstanceProfile1'
If replace role attribute with roles in aws_iam_instance_profile definition - all works as expected, IAM role will be re-added to th Instance profile.
Hi @Avolynsk - Thanks for taking the time to submit this issue. I had a look at this with the most recent versions of Terraform and the AWS Provider (0.12.13 and 2.38.0 as of right now) and was unable to reproduce this behavior. We’re going to close this issue for now, but if you run into this again with the latest Terraform and Provider versions, please feel free to open a new issue. 🙂
Community Note
Terraform Version
Terraform v0.11.13
provider.aws v2.6.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/Avolynsk/31f1cda9293da47698ff8f346392faa8
Panic Output
Expected Behavior
terraform apply should re-add IAM role to the IAM instance profile
Actual Behavior
terraform does't re-add IAM role to the IAM instance profile
Steps to Reproduce
terraform apply
- this is a cold start, all resources will be created in AWSterraform apply
- will re-create 'FakeRole1', but 'Instance Profile ARNs' will be blank - the role will not be attached to the initial 'FakeInstanceProfile1'If replace
role
attribute withroles
in aws_iam_instance_profile definition - all works as expected, IAM role will be re-added to th Instance profile.Important Factoids
References
The text was updated successfully, but these errors were encountered: