Closed lays147 closed 2 years ago
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
Hi @lays147 !
You can use data-source aws_lambda_layer_version to get latest available version and pass it to a function instead of:
layers = [
module.lambda_layer.lambda_layer_arn
]
It is the only solution that comes to my mind since you are using different pipelines for layer and for function.
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
Hi, I'm using this module to set up a lambda function and layer. The lambda and layer are updated in a separated pipeline. However, when running terraform pipeline again, the plan changes the lambda layer version back to the version in the terraform state, and I would like to ignore changes in the layer version. How does one do that? I know that can be done using lifecycle rules, but as I can't set it dynamically. Is there a workaround for this?
Versions
Reproduction
Steps to reproduce the behavior:
Code Snippet to Reproduce
Expected behavior
Lambda layer version in function is ignored.
Actual behavior
Lambda layer in function is changed back to the version in the state.
Terminal Output Screenshot(s)
In this case, I need my lambda to use the version 3 of the layer instead of the 4. And as you can see
Additional context