Skip to content

Commit 761368e

Browse files
authored
feat: Add support for path in iam-group-with-assumable-roles-policy (#345)
1 parent 20a23cf commit 761368e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

modules/iam-group-with-assumable-roles-policy/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ No modules.
3737
| <a name="input_assumable_roles"></a> [assumable\_roles](#input\_assumable\_roles) | List of IAM roles ARNs which can be assumed by the group | `list(string)` | `[]` | no |
3838
| <a name="input_group_users"></a> [group\_users](#input\_group\_users) | List of IAM users to have in an IAM group which can assume the role | `list(string)` | `[]` | no |
3939
| <a name="input_name"></a> [name](#input\_name) | Name of IAM policy and IAM group | `string` | n/a | yes |
40+
| <a name="input_path"></a> [path](#input\_path) | Path of IAM policy and IAM group | `string` | `"/"` | no |
4041
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources. | `map(string)` | `{}` | no |
4142

4243
## Outputs

modules/iam-group-with-assumable-roles-policy/main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ data "aws_iam_policy_document" "assume_role" {
88

99
resource "aws_iam_policy" "this" {
1010
name = var.name
11+
path = var.path
1112
description = "Allows to assume role in another AWS account"
1213
policy = data.aws_iam_policy_document.assume_role.json
1314

@@ -16,6 +17,7 @@ resource "aws_iam_policy" "this" {
1617

1718
resource "aws_iam_group" "this" {
1819
name = var.name
20+
path = var.path
1921
}
2022

2123
resource "aws_iam_group_policy_attachment" "this" {

modules/iam-group-with-assumable-roles-policy/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ variable "name" {
33
type = string
44
}
55

6+
variable "path" {
7+
description = "Path of IAM policy and IAM group"
8+
type = string
9+
default = "/"
10+
}
11+
612
variable "assumable_roles" {
713
description = "List of IAM roles ARNs which can be assumed by the group"
814
type = list(string)

0 commit comments

Comments
 (0)