File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ terraform {
33}
44
55resource "aws_lambda_function" "lambda_function" {
6- image_uri = var. image_uri != " " ? var . image_uri : null
6+ image_uri = var. image_uri
77 s3_bucket = var. s3_bucket
88 s3_key = var. s3_key
99 function_name = var. function_name
@@ -14,11 +14,11 @@ resource "aws_lambda_function" "lambda_function" {
1414 memory_size = var. memory_size
1515 reserved_concurrent_executions = var. reserved_concurrent_executions
1616 tags = var. tags
17- package_type = var. image_uri != " " ? " Image" : " Zip"
17+ package_type = var. image_uri != null ? " Image" : " Zip"
1818 layers = var. layers
1919
2020 dynamic "image_config" {
21- for_each = var. image_uri != " " ? [1 ] : []
21+ for_each = var. image_uri != null ? [1 ] : []
2222 content {
2323 command = var. image_config_command
2424 entry_point = var. image_config_entry_point
Original file line number Diff line number Diff line change 11{
2- "resource_changes" : [{
2+ "resource_changes" : [{
33 "address" : " module.lambda.aws_cloudwatch_log_group.lambda_loggroup" ,
44 "module_address" : " module.lambda" ,
55 "mode" : " managed" ,
101101 ],
102102 "image_uri" : " image" ,
103103 "kms_key_arn" : null ,
104- "layers" : null ,
104+ "layers" : [] ,
105105 "memory_size" : 128 ,
106106 "package_type" : " Image" ,
107107 "publish" : false ,
133133 ],
134134 "invoke_arn" : true ,
135135 "last_modified" : true ,
136+ "layers" : [],
136137 "qualified_arn" : true ,
137138 "role" : true ,
138139 "signing_job_arn" : true ,
Original file line number Diff line number Diff line change 11variable "image_uri" {
22 type = string
33 description = " Optional ECR image (for image based lambda)"
4- default = " "
4+ default = null
55}
66
77variable "image_config_command" {
88 type = list (string )
99 description = " Optional override of image's CMD"
10- default = null
10+ default = []
1111}
1212
1313variable "image_config_entry_point" {
1414 type = list (string )
1515 description = " Optional override of image's ENTRYPOINT"
16- default = null
16+ default = []
1717}
1818
1919variable "image_config_working_directory" {
@@ -129,5 +129,5 @@ variable "tags" {
129129variable "layers" {
130130 type = list (string )
131131 description = " ARNs of the layers to attach to the lambda function in order"
132- default = null
132+ default = []
133133}
You can’t perform that action at this time.
0 commit comments