Skip to content

Commit fc0c120

Browse files
authored
feat: Added path input variable for lambda module IAM role (#150)
1 parent f7dd0a3 commit fc0c120

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ To run the tests:
118118
| <a name="input_create_sns_topic"></a> [create\_sns\_topic](#input\_create\_sns\_topic) | Whether to create new SNS topic | `bool` | `true` | no |
119119
| <a name="input_iam_role_boundary_policy_arn"></a> [iam\_role\_boundary\_policy\_arn](#input\_iam\_role\_boundary\_policy\_arn) | The ARN of the policy that is used to set the permissions boundary for the role | `string` | `null` | no |
120120
| <a name="input_iam_role_name_prefix"></a> [iam\_role\_name\_prefix](#input\_iam\_role\_name\_prefix) | A unique role name beginning with the specified prefix | `string` | `"lambda"` | no |
121+
| <a name="input_iam_role_path"></a> [iam\_role\_path](#input\_iam\_role\_path) | Path of IAM role to use for Lambda Function | `string` | `null` | no |
121122
| <a name="input_iam_role_tags"></a> [iam\_role\_tags](#input\_iam\_role\_tags) | Additional tags for the IAM role | `map(string)` | `{}` | no |
122123
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | ARN of the KMS key used for decrypting slack webhook url | `string` | `""` | no |
123124
| <a name="input_lambda_description"></a> [lambda\_description](#input\_lambda\_description) | The description of the Lambda function | `string` | `null` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ module "lambda" {
102102
role_name = "${var.iam_role_name_prefix}-${var.lambda_function_name}"
103103
role_permissions_boundary = var.iam_role_boundary_policy_arn
104104
role_tags = var.iam_role_tags
105+
role_path = var.iam_role_path
105106

106107
# Do not use Lambda's policy for cloudwatch logs, because we have to add a policy
107108
# for KMS conditionally. This way attach_policy_json is always true independenty of

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ variable "iam_role_name_prefix" {
114114
default = "lambda"
115115
}
116116

117+
variable "iam_role_path" {
118+
description = "Path of IAM role to use for Lambda Function"
119+
type = string
120+
default = null
121+
}
122+
117123
variable "lambda_function_tags" {
118124
description = "Additional tags for the Lambda function"
119125
type = map(string)

0 commit comments

Comments
 (0)