# Terraform plan shows changes in lambda even if there is no changes

**URL:** <https://discuss.hashicorp.com/t/terraform-plan-shows-changes-in-lambda-even-if-there-is-no-changes/49961>\
**Category:** AWS\
**Created:** [February 9, 2023, 4:23pm UTC](https://discuss.hashicorp.com/t/terraform-plan-shows-changes-in-lambda-even-if-there-is-no-changes/49961 "2023-02-09T16:23:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![savita.fulmali](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@savita.fulmali](https://discuss.hashicorp.com/u/savita.fulmali)\
**Post date:** [February 9, 2023, 4:23pm UTC](https://discuss.hashicorp.com/t/terraform-plan-shows-changes-in-lambda-even-if-there-is-no-changes/49961/1 "2023-02-09T16:23:37Z")

</div>

We are using module terraform-aws-modules/lambda/aws for creating lambda in our environments (Nonprod/common/prod).

Terraform plans shows destroy & recreation of all lambda’s even if there is no change we have specifically done. it is force replacing due to file path / timestamp changes.

Below is the one of the error (error same for all other lambda’s)

-/+ resource “null\_resource” “archive” {  
~ id = “4667949308722705294” → (known after apply)  
~ triggers = { # forces replacement  
~ “timestamp” = “1661852603491162000” → “1675943864235205000”  
# (1 unchanged element hidden)  
}  
}

I tried adding environment variable TF\_RECREATE\_MISSING\_LAMBDA\_PACKAGE=false but it doesn’t work. shows same terraform plan.

I tried adding recreate\_missing\_package = false in lambda module (in tfstate current value of recreate\_missing\_package is true) but still see same terraform plan.

Need help urgently here. We dont want to recreate lambda every time if there aren’t any changes.

---

<div class="post-metadata">

**Author:** ![amos-israeli](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/amos-israeli/32/45456_2.png) [@amos-israeli](https://discuss.hashicorp.com/u/amos-israeli)\
**Post date:** [April 19, 2025, 1:45pm UTC](https://discuss.hashicorp.com/t/terraform-plan-shows-changes-in-lambda-even-if-there-is-no-changes/49961/3 "2025-04-19T13:45:42Z")

</div>

Did you mange to solve it?  
I have exactly the same problem.

---

<div class="post-metadata">

**Author:** ![acwwat](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/acwwat/32/41481_2.png) [@acwwat](https://discuss.hashicorp.com/u/acwwat)\
**Post date:** [April 25, 2025, 2:41am UTC](https://discuss.hashicorp.com/t/terraform-plan-shows-changes-in-lambda-even-if-there-is-no-changes/49961/4 "2025-04-25T02:41:03Z")

</div>

Looking at [terraform-aws-lambda/package.tf at master · terraform-aws-modules/terraform-aws-lambda · GitHub](https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/package.tf), something must be triggering replacement of `data.external.archive_prepare[0]`, which subsequently changes the timestamp. You can set the `trigger_on_package_timestamp` variable to false, but might ignore changes to the package. Perhaps you can get more info from the log output from `package.py`.
