File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,17 @@ resource "aws_lambda_function" "this" {
43
43
replacement_security_group_ids = var. replacement_security_group_ids
44
44
skip_destroy = var. skip_destroy
45
45
46
+ /* ignore image_uri when var.ignore_image_uri is true */
47
+ dynamic "lifecycle" {
48
+ for_each = var. ignore_image_uri ? [1 ] : []
49
+
50
+ content {
51
+ ignore_changes = [
52
+ image_uri ,
53
+ ]
54
+ }
55
+ }
56
+
46
57
/* ephemeral_storage is not supported in gov-cloud region, so it should be set to `null` */
47
58
dynamic "ephemeral_storage" {
48
59
for_each = var. ephemeral_storage_size == null ? [] : [true ]
Original file line number Diff line number Diff line change @@ -224,6 +224,12 @@ variable "image_uri" {
224
224
default = null
225
225
}
226
226
227
+ variable "ignore_image_uri" {
228
+ description = " Whether to ignore changes to the function's image URI. Set to true if you manage infrastructure and code deployments separately."
229
+ type = bool
230
+ default = false
231
+ }
232
+
227
233
variable "image_config_entry_point" {
228
234
description = " The ENTRYPOINT for the docker image"
229
235
type = list (string )
You can’t perform that action at this time.
0 commit comments