Skip to content

Commit b3179a9

Browse files
authored
feat: Added policy path variable to lambda module IAM role policy (#153)
1 parent e647784 commit b3179a9

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
@@ -116,6 +116,7 @@ To run the tests:
116116
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | Additional tags for the Cloudwatch log group | `map(string)` | `{}` | no |
117117
| <a name="input_create"></a> [create](#input\_create) | Whether to create all resources | `bool` | `true` | no |
118118
| <a name="input_create_sns_topic"></a> [create\_sns\_topic](#input\_create\_sns\_topic) | Whether to create new SNS topic | `bool` | `true` | no |
119+
| <a name="input_iam_policy_path"></a> [iam\_policy\_path](#input\_iam\_policy\_path) | Path of policies to that should be added to IAM role for Lambda Function | `string` | `null` | no |
119120
| <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 |
120121
| <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 |
121122
| <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 |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ module "lambda" {
102102
role_permissions_boundary = var.iam_role_boundary_policy_arn
103103
role_tags = var.iam_role_tags
104104
role_path = var.iam_role_path
105+
policy_path = var.iam_policy_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
@@ -120,6 +120,12 @@ variable "iam_role_path" {
120120
default = null
121121
}
122122

123+
variable "iam_policy_path" {
124+
description = "Path of policies to that should be added to IAM role for Lambda Function"
125+
type = string
126+
default = null
127+
}
128+
123129
variable "lambda_function_tags" {
124130
description = "Additional tags for the Lambda function"
125131
type = map(string)

0 commit comments

Comments
 (0)