Commit 5bb2ab91 authored by Víctor M. Mesas's avatar Víctor M. Mesas Committed by GitHub

fix: Allow customisation of trusted_role_actions in iam-assumable-role module (#76)

parent 3b665db2
...@@ -39,6 +39,7 @@ Trusted resources can be any [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/U ...@@ -39,6 +39,7 @@ Trusted resources can be any [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/U
| role\_permissions\_boundary\_arn | Permissions boundary ARN to use for IAM role | `string` | `""` | no | | role\_permissions\_boundary\_arn | Permissions boundary ARN to use for IAM role | `string` | `""` | no |
| role\_requires\_mfa | Whether role requires MFA | `bool` | `true` | no | | role\_requires\_mfa | Whether role requires MFA | `bool` | `true` | no |
| tags | A map of tags to add to IAM role resources | `map(string)` | `{}` | no | | tags | A map of tags to add to IAM role resources | `map(string)` | `{}` | no |
| trusted\_role\_actions | Actions of STS | `list(string)` | <pre>[<br> "sts:AssumeRole"<br>]</pre> | no |
| trusted\_role\_arns | ARNs of AWS entities who can assume these roles | `list(string)` | `[]` | no | | trusted\_role\_arns | ARNs of AWS entities who can assume these roles | `list(string)` | `[]` | no |
| trusted\_role\_services | AWS Services that can assume these roles | `list(string)` | `[]` | no | | trusted\_role\_services | AWS Services that can assume these roles | `list(string)` | `[]` | no |
......
...@@ -2,7 +2,7 @@ data "aws_iam_policy_document" "assume_role" { ...@@ -2,7 +2,7 @@ data "aws_iam_policy_document" "assume_role" {
statement { statement {
effect = "Allow" effect = "Allow"
actions = ["sts:AssumeRole"] actions = var.trusted_role_actions
principals { principals {
type = "AWS" type = "AWS"
......
variable "trusted_role_actions" {
description = "Actions of STS"
type = list(string)
default = ["sts:AssumeRole"]
}
variable "trusted_role_arns" { variable "trusted_role_arns" {
description = "ARNs of AWS entities who can assume these roles" description = "ARNs of AWS entities who can assume these roles"
type = list(string) type = list(string)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment