{"id":19508938,"url":"https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda","last_synced_at":"2026-04-26T16:32:28.627Z","repository":{"id":38297039,"uuid":"235818313","full_name":"rhythmictech/terraform-aws-asg-rolling-restart-lambda","owner":"rhythmictech","description":"Creates a Lambda function that when invoked triggers a rolling restart of an autoscaling group","archived":false,"fork":false,"pushed_at":"2022-06-07T20:27:06.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-01T02:41:21.794Z","etag":null,"topics":["auto-scaling-group","aws","lambda","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/rhythmictech/asg-rolling-restart-lambda/aws","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhythmictech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-01-23T15:01:00.000Z","updated_at":"2022-05-06T18:44:51.000Z","dependencies_parsed_at":"2022-09-08T07:10:54.206Z","dependency_job_id":null,"html_url":"https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/rhythmictech/terraform-aws-asg-rolling-restart-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-asg-rolling-restart-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-asg-rolling-restart-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-asg-rolling-restart-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-asg-rolling-restart-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhythmictech","download_url":"https://codeload.github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-asg-rolling-restart-lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32305035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-scaling-group","aws","lambda","terraform","terraform-module"],"created_at":"2024-11-10T23:10:25.742Z","updated_at":"2026-04-26T16:32:28.610Z","avatar_url":"https://github.com/rhythmictech.png","language":"HCL","readme":"# terraform-aws-asg-rolling-restart-lambda\n\nThis module creates a lambda that uses an ASG's healthchecks to do a rolling restart of its instances. Note that there are other strategies to handle this, including what is now native ASG functionality. However, this module still has some advantages and is therefore not deprecated.\n\n[![tflint](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/workflows/tflint/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster)\n[![tfsec](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/workflows/tfsec/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster)\n[![yamllint](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/workflows/yamllint/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster)\n[![misspell](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/workflows/misspell/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster)\n[![pre-commit-check](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/workflows/pre-commit-check/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-asg-rolling-restart-lambda/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster)\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=RhythmicTech\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/RhythmicTech?style=social\u0026logo=twitter\" alt=\"follow on Twitter\"\u003e\u003c/a\u003e\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.13.4 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | n/a |\n| \u003ca name=\"provider_external\"\u003e\u003c/a\u003e [external](#provider\\_external) | n/a |\n| \u003ca name=\"provider_null\"\u003e\u003c/a\u003e [null](#provider\\_null) | n/a |\n| \u003ca name=\"provider_random\"\u003e\u003c/a\u003e [random](#provider\\_random) | n/a |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_lambda_version\"\u003e\u003c/a\u003e [lambda\\_version](#module\\_lambda\\_version) | rhythmictech/find-release-by-semver/github | ~\u003e 1.1 |\n| \u003ca name=\"module_tags\"\u003e\u003c/a\u003e [tags](#module\\_tags) | rhythmictech/tags/terraform | ~\u003e 1.1 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_iam_role_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |\n| [aws_iam_role_policy_attachment.lambda-execution-role-attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_lambda_function.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |\n| [null_resource.lambda_zip](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |\n| [random_uuid.lambda_uuid](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid) | resource |\n| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |\n| [aws_iam_policy_document.lambda_assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_iam_policy_document.lambda_policy_doc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |\n| [external_external.sha](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/external) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_asg_name\"\u003e\u003c/a\u003e [asg\\_name](#input\\_asg\\_name) | Name of the ASG to execute the rolling restart against | `string` | n/a | yes |\n| \u003ca name=\"input_lambda_version_constraint\"\u003e\u003c/a\u003e [lambda\\_version\\_constraint](#input\\_lambda\\_version\\_constraint) | NPM style version constraint to apply when looking for the correct version of the lambda code | `string` | `\"~1.0.1-rc9\"` | no |\n| \u003ca name=\"input_loglevel\"\u003e\u003c/a\u003e [loglevel](#input\\_loglevel) | Logging level for the rolling restart lambda function. | `string` | `\"INFO\"` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name to be used for resources | `string` | `\"rolling-restart-lambda\"` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Map of tags that should be added to stuff | `map(any)` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_function_arn\"\u003e\u003c/a\u003e [function\\_arn](#output\\_function\\_arn) | ARN of the Lambda function |\n| \u003ca name=\"output_function_name\"\u003e\u003c/a\u003e [function\\_name](#output\\_function\\_name) | Name of the Lambda function |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Getting Started\nThis workflow has a few prerequisites which are installed through the `./bin/install-x.sh` scripts and are linked below. The install script will also work on your local machine. \n\n- [pre-commit](https://pre-commit.com)\n- [terraform](https://terraform.io)\n- [tfenv](https://github.com/tfutils/tfenv)\n- [terraform-docs](https://github.com/segmentio/terraform-docs)\n- [tfsec](https://github.com/tfsec/tfsec)\n- [tflint](https://github.com/terraform-linters/tflint)\n\nWe use `tfenv` to manage `terraform` versions, so the version is defined in the `versions.tf` and `tfenv` installs the latest compliant version.\n`pre-commit` is like a package manager for scripts that integrate with git hooks. We use them to run the rest of the tools before apply. \n`terraform-docs` creates the beautiful docs (above),  `tfsec` scans for security no-nos, `tflint` scans for best practices. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-asg-rolling-restart-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmictech%2Fterraform-aws-asg-rolling-restart-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-asg-rolling-restart-lambda/lists"}