Skip to content

Commit 393f260

Browse files
committed
Try to deprecate variable policy_path correctly
1 parent 40c75c5 commit 393f260

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.96.1
3+
rev: v1.96.3
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ No modules.
823823
| <a name="input_policy_json"></a> [policy\_json](#input\_policy\_json) | An additional policy document as JSON to attach to the Lambda Function role | `string` | `null` | no |
824824
| <a name="input_policy_jsons"></a> [policy\_jsons](#input\_policy\_jsons) | List of additional policy documents as JSON to attach to Lambda Function role | `list(string)` | `[]` | no |
825825
| <a name="input_policy_name"></a> [policy\_name](#input\_policy\_name) | IAM policy name. It override the default value, which is the same as role\_name | `string` | `null` | no |
826+
| <a name="input_policy_path"></a> [policy\_path](#input\_policy\_path) | Path of policies to that should be added to IAM role for Lambda Function | `string` | `null` | no |
826827
| <a name="input_policy_statements"></a> [policy\_statements](#input\_policy\_statements) | Map of dynamic policy statements to attach to Lambda Function role | `any` | `{}` | no |
827828
| <a name="input_provisioned_concurrent_executions"></a> [provisioned\_concurrent\_executions](#input\_provisioned\_concurrent\_executions) | Amount of capacity to allocate. Set to 1 or greater to enable, or set to 0 to disable provisioned concurrency. | `number` | `-1` | no |
828829
| <a name="input_publish"></a> [publish](#input\_publish) | Whether to publish creation/change as new Lambda Function Version. | `bool` | `false` | no |

variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,14 @@ variable "attach_policies" {
578578
default = false
579579
}
580580

581+
# TODO: DEPRECATED: Remove this variable in the next major version
582+
# tflint-ignore: all
583+
variable "policy_path" {
584+
description = "Path of policies to that should be added to IAM role for Lambda Function"
585+
type = string
586+
default = null
587+
}
588+
581589
variable "number_of_policy_jsons" {
582590
description = "Number of policies JSON to attach to IAM role for Lambda Function"
583591
type = number

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ module "wrapper" {
9393
policy_json = try(each.value.policy_json, var.defaults.policy_json, null)
9494
policy_jsons = try(each.value.policy_jsons, var.defaults.policy_jsons, [])
9595
policy_name = try(each.value.policy_name, var.defaults.policy_name, null)
96+
policy_path = try(each.value.policy_path, var.defaults.policy_path, null)
9697
policy_statements = try(each.value.policy_statements, var.defaults.policy_statements, {})
9798
provisioned_concurrent_executions = try(each.value.provisioned_concurrent_executions, var.defaults.provisioned_concurrent_executions, -1)
9899
publish = try(each.value.publish, var.defaults.publish, false)

0 commit comments

Comments
 (0)