Add aws_iam_assume_role_policy resource #6399
Labels
new-resource
Introduces a new resource.
proposal
Proposes new design or functionality.
service/iam
Issues and PRs that pertain to the iam service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
Community Note
Description
In some companies, teams do not have the ability to create their own IAM roles, but they are able to manage the permissions & assume role policy for those roles once the roles are created by a governance team. Such teams cannot easily use the
aws_iam_role
resource, since it will attempt (and fail) to create the role on first run. Teams can manually import the role, but that adds an error-prone manual step to infrastructure automation and discourages the use of more roles that have fewer permissions (encouraging, instead, the use of over-permissioned roles that are shared between components).While it's possible to manage the assume role policy directly with a
null_resource
and theaws
CLI, this does not react to changes made outside of terraform, so that solution requires added monitoring to ensure the assume role policy is kept in line with terraform configuration.The introduction of an
aws_iam_assume_role_policy
resource would enable teams working under similar governance policies to manage the assume role policy for any of their IAM roles without relying on manually importing roles or additional monitoring to keep real resources aligned with configuration.New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: