Closed bpgould closed 1 year ago
All of my lambdas in CICD get this:
# module.update_snow_success.module.lambda_function.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
~ id = "3888062224359755732" -> (known after apply)
~ triggers = { # forces replacement
~ "timestamp" = "1685457166975563000" -> "1685561913544040000"
# (1 unchanged element hidden)
}
}
appears to be a duplicate to https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/396
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This issue was automatically closed because of stale in 10 days
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
The docs for the module state "Hash of zip-archive created with the same content of the files is always identical which prevents unnecessary force-updates of the Lambda resources unless content modifies. If you need to have different filenames for the same content you can specify extra string argument hash_extra."
However, I am getting replacement based on timestamp.
Checking the source code I see exactly what I expected: https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/package.tf
on line 64
this does not align with the expected behavior of ' prevents unnecessary force-updates of the Lambda resources unless content modifies'. I would like to be able to disable timestamp based replacement without having to fork the module and delete the trigger.
Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the
examples/*
directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by runningterraform init && terraform apply
without any further changes.If your request is for a new feature, please use the
Feature request
template.⚠️ Note
Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]: 4.13.0 [latest]
Terraform version: 1.4.2
Provider version(s):
Reproduction Code [Required]
Steps to reproduce the behavior:
no yes using module inside my own module and getting unexpected behavior ## Expected behavior The deployment package should only be updated with the code changes and the hash of the zip changes.Actual behavior
Every build is CICD is causing all deployment packages to get re-built based on the timestamp trigger.
Terminal Output Screenshot(s)
Additional context