Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
aws_lambda_function with the option publish=true after awhile creates a long list of old lambda function versions (that can even hold onto ENI's if configured with a VPC, costing $$). It would be nice to be able to either manage those versions separately with another resource or have some option within aws_lambda_function that will manage only a rolling number of versions of the function, deleting old ones when no longer needed.
additionally
aws_lambda_layer_version only maintains a single version of the layer. It will delete the old layer before uploading a new one. I would like to be able to manage this in the same way as the above aws_lambda_function with the ability to maintain a rolling list of the versions. (I could totally be using this resource wrong and this is already supported, but I dont see how to actually acheive this)
Community Note
Description
aws_lambda_function
with the optionpublish=true
after awhile creates a long list of old lambda function versions (that can even hold onto ENI's if configured with a VPC, costing $$). It would be nice to be able to either manage those versions separately with another resource or have some option withinaws_lambda_function
that will manage only a rolling number of versions of the function, deleting old ones when no longer needed.additionally
aws_lambda_layer_version
only maintains a single version of the layer. It will delete the old layer before uploading a new one. I would like to be able to manage this in the same way as the aboveaws_lambda_function
with the ability to maintain a rolling list of the versions. (I could totally be using this resource wrong and this is already supported, but I dont see how to actually acheive this)New or Affected Resource(s)
Potential Terraform Configuration