You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been using ami-housekeeper for some time now, it really helps to make sure we don't end up with a lot of AMIs as I build a new one every week.
Although, today I had an issue where AMIs in use were deleted and I was able to pinpoint it to the ami-housekeeper SSM query that didn't match up our provided ssmParameterNames filter. After investigating and reading the docs again I realized that the ami-housekeeper expects the parameters to contain ami-id in the name. Initially I thought this was a suggestion, instead of a requirement since we can also customize the filter to search for parameter name using ssmParameterNames. Docs:
When you set ssmParameterNames to *ami-id, the module will regard all AMIs referenced in SSM as in use, sparing them from deletion.
I looked into the code to check how to customize it:
and would like to add a new parameter named ssmParameterFilters to use the defaults as the current values, but allow it to be customizable so we can use any desired filter. I already have a working lambda, so please let me know if this is something that would be accepted and I would open a PR for it.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi, I've been using
ami-housekeeper
for some time now, it really helps to make sure we don't end up with a lot of AMIs as I build a new one every week.Although, today I had an issue where AMIs in use were deleted and I was able to pinpoint it to the
ami-housekeeper
SSM query that didn't match up our providedssmParameterNames
filter. After investigating and reading the docs again I realized that theami-housekeeper
expects the parameters to containami-id
in the name. Initially I thought this was a suggestion, instead of a requirement since we can also customize the filter to search for parameter name usingssmParameterNames
. Docs:I looked into the code to check how to customize it:
terraform-aws-github-runner/lambdas/functions/ami-housekeeper/src/ami.ts
Lines 194 to 202 in 26ad5c1
and would like to add a new parameter named
ssmParameterFilters
to use the defaults as the current values, but allow it to be customizable so we can use any desired filter. I already have a working lambda, so please let me know if this is something that would be accepted and I would open a PR for it.Thank you!
The text was updated successfully, but these errors were encountered: