Closed YakDriver closed 3 years ago
This functionality has been released in v3.48.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Description
AWS services have operations that require a principal (e.g., an IAM user, role, or group). Sometimes these operations fail if an assumed-role ARN is passed in. Ideally, what you want is to grant/convey/designate the IAM source role so that the STS assumed role will have the benefit of the change, and the operation will succeed.
For example, in the Lake Formation service, you cannot make an assumed role a data lake administrator. If you try to, you receive this error:
However, if you pass in the source IAM role (
arn:aws:iam::123456789012:role/role_name
), the operation will succeed. The role will become an administrator and the person using the assumed role will have the benefit of the change as well.Another example is in Service Catalog. There you may get this type of similar error:
However, in the same vein, if you pass in the source IAM role, the operation will succeed.
A solution is to create a new data source call
aws_iam_session_context
to find the IAM source role of an STS assumed role. This data source should allow passing through IAM roles and users so that it can be used whether the role is STS or IAM and then everyone can use the same config.Affected Data Source
Potential Terraform Configuration
References
19572