Skip to content

Commit

Permalink
fix: Allow customisation of trusted_role_actions in iam-assumable-rol…
Browse files Browse the repository at this point in the history
…e module (#76)
  • Loading branch information
Víctor M. Mesas authored May 26, 2020
1 parent 3b665db commit 5bb2ab9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/iam-assumable-role/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\_requires\_mfa | Whether role requires MFA | `bool` | `true` | 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\_services | AWS Services that can assume these roles | `list(string)` | `[]` | no |

Expand Down
2 changes: 1 addition & 1 deletion modules/iam-assumable-role/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "aws_iam_policy_document" "assume_role" {
statement {
effect = "Allow"

actions = ["sts:AssumeRole"]
actions = var.trusted_role_actions

principals {
type = "AWS"
Expand Down
6 changes: 6 additions & 0 deletions modules/iam-assumable-role/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
variable "trusted_role_actions" {
description = "Actions of STS"
type = list(string)
default = ["sts:AssumeRole"]
}

variable "trusted_role_arns" {
description = "ARNs of AWS entities who can assume these roles"
type = list(string)
Expand Down

0 comments on commit 5bb2ab9

Please sign in to comment.