terraform-aws-iam
                                
                                 terraform-aws-iam copied to clipboard
                                
                                    terraform-aws-iam copied to clipboard
                            
                            
                            
                        how to create inline policy w with assumable role
I want to create inline policy with assumable role.
Currently,i see it only supports custom policy arn not inline policy JSON.
Could you please how to create inline policy with assumable role.
My IAM role contains customer managed policy ,aws managed policyband inlinepolicy.
Current module setup only supporting aws and customer mananged policy.
Please suggest.
@kapil1699 specifically what module are you talking about here?
@max-rocket-internet : I am using below module reference.
modules/iam-assumable-role/main.tf
Doesn't seem possible atm with the iam-assumable-role. Would be great to have some variable like:
variable "inline_policies" {
  description = "A map of json policies with key = inline_policy_name and value = policy_json"
  type        = map(string)
}
@kapil1699 Currently, the workaround would be to use aws_iam_role_policy to attach the inline policy:
resource "aws_iam_role_policy" "inline_policy" {
  name   = "inline-policy"
  role   = module.created_from_iam_assumable_role.iam_role_name
  policy = <your-policy-json>
}
Can we take this as feature request if it is not possible with current state.
As this is expected for any iam assumable role to have aws managed, customer manage and inline policy in same role.
Any other suggestion appriecated.
also interested in this feature! +1
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This issue was automatically closed because of stale in 10 days
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.