Skip to content

Commit cc66ffb

Browse files
authored
Merge pull request #21 from SPHTech-Platform/add/recreate-missing-package
add recreate missing package flag
2 parents 84b3cd1 + 7777125 commit cc66ffb

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

main.tf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ module "lambda" {
6262
ignore_source_code_hash = true
6363

6464
# dummy package, package is delegated to CI pipeline
65-
local_existing_package = data.archive_file.dummy.output_path
66-
source_path = var.source_path
67-
policies = var.managed_policy_arns
68-
policy_jsons = var.policy_jsons
69-
policy_json = var.policy_json
70-
policy_statements = var.policy_statements
71-
number_of_policy_jsons = var.number_of_policy_jsons
72-
number_of_policies = var.number_of_managed_policies
65+
local_existing_package = data.archive_file.dummy.output_path
66+
recreate_missing_package = var.recreate_missing_package
67+
source_path = var.source_path
68+
policies = var.managed_policy_arns
69+
policy_jsons = var.policy_jsons
70+
policy_json = var.policy_json
71+
policy_statements = var.policy_statements
72+
number_of_policy_jsons = var.number_of_policy_jsons
73+
number_of_policies = var.number_of_managed_policies
7374

7475
use_existing_cloudwatch_log_group = !var.create_lambda_cloudwatch_log_group
7576
cloudwatch_logs_retention_in_days = var.cloudwatch_logs_retention_in_days

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ variable "create_lambda_cloudwatch_log_group" {
4040
default = true
4141
}
4242

43+
variable "recreate_missing_package" {
44+
description = "Controls whether to recreate the package if it is missing"
45+
type = bool
46+
default = true
47+
}
48+
4349
######################################
4450
# AWS OIDC integration GitHub Actions
4551
######################################

0 commit comments

Comments
 (0)