The resource "aws_cloud9_environment_membership" cannot be destroyed by an administrator. It has to be destroyed by an owner.
It would be nice to have a skip_destroy parameter to skip destroying the resource.
Actual Behavior
Terraform try to remove the resource and AWS return an error "Forbidden Exception".
Relevant Error/Panic Output Snippet
│ Error: deleting Cloud9 EC2 Environment (xxxxxxxxxxxxxxxxxxxxxxxx#arn:aws:sts::yyyyyyyyyyyyy:assumed-role/role_name): ForbiddenException: arn:aws:sts::yyyyyyyyyyyyy:assumed-role/gitlab/cicd is not the environment owner so can't delete another member.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.3.7
AWS Provider Version
4.53.0
Affected Resource(s)
aws_cloud9_environment_membership
Expected Behavior
The resource "aws_cloud9_environment_membership" cannot be destroyed by an administrator. It has to be destroyed by an owner. It would be nice to have a skip_destroy parameter to skip destroying the resource.
Actual Behavior
Terraform try to remove the resource and AWS return an error "Forbidden Exception".
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Please, follow these steps to reproduce the issue:
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None