Skip to content

Commit a2ad4cd

Browse files
feat: Added Extra STS actions param in assumable role with SAML (#317)
Co-authored-by: Anton Babenko <[email protected]>
1 parent 90349fa commit a2ad4cd

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

modules/iam-assumable-role-with-saml/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ No modules.
5252
| <a name="input_role_permissions_boundary_arn"></a> [role\_permissions\_boundary\_arn](#input\_role\_permissions\_boundary\_arn) | Permissions boundary ARN to use for IAM role | `string` | `""` | no |
5353
| <a name="input_role_policy_arns"></a> [role\_policy\_arns](#input\_role\_policy\_arns) | List of ARNs of IAM policies to attach to IAM role | `list(string)` | `[]` | no |
5454
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to IAM role resources | `map(string)` | `{}` | no |
55+
| <a name="input_trusted_role_actions"></a> [trusted\_role\_actions](#input\_trusted\_role\_actions) | Extra Actions of STS | `list(string)` | <pre>[<br> ""<br>]</pre> | no |
5556

5657
## Outputs
5758

modules/iam-assumable-role-with-saml/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ data "aws_iam_policy_document" "assume_role_with_saml" {
3434

3535
statement {
3636
effect = "Allow"
37-
actions = ["sts:AssumeRoleWithSAML"]
37+
actions = compact(distinct(concat(["sts:AssumeRoleWithSAML"], var.trusted_role_actions)))
3838

3939
principals {
4040
type = "Federated"

modules/iam-assumable-role-with-saml/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@ variable "allow_self_assume_role" {
8787
type = bool
8888
default = false
8989
}
90+
91+
variable "trusted_role_actions" {
92+
description = "Extra Actions of STS"
93+
type = list(string)
94+
default = [""]
95+
}

0 commit comments

Comments
 (0)