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" {
4343 replacement_security_group_ids = var. replacement_security_group_ids
4444 skip_destroy = var. skip_destroy
4545
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+
4657 /* ephemeral_storage is not supported in gov-cloud region, so it should be set to `null` */
4758 dynamic "ephemeral_storage" {
4859 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" {
224224 default = null
225225}
226226
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+
227233variable "image_config_entry_point" {
228234 description = " The ENTRYPOINT for the docker image"
229235 type = list (string )
You can’t perform that action at this time.
0 commit comments