lambda-nuke

diodonfrost/lambda-nuke/aws

Terraform Module HCL AWS

Terraform module that creates a lambda to destroy all resources in an AWS account.

Install
module "lambda-nuke" {
source = "diodonfrost/lambda-nuke/aws"
version = "3.0.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-lambda-nuke ![CI](https://github.com/diodonfrost/terraform-aws-lambda-nuke/actions) Terraform module which create lambda which nuke all resources on aws account Requirements This role was developed using python lib boto3 1.13.34 Backwards compatibility is not guaranteed. Terraform versions For Terraform 0.15. use version v2. of this module. If you are using Terraform 0.11 you can use versions v1.. Caveats This following resources are not supported because creation timestamp are not present: Compute - ecs Database: - dax Usage ``hcl module "nuke_everything_older_than_7d" { source = "diodonfrost/lambda-nuke/aws" name = "nuke_everything" cloudwatch_schedule_expression = "cron(0 00 ? FRI )" exclude_resources = "key_pairs,rds" older_than = "7d" } ` Examples Compute-nuke Create lam

Inputs (9)
NameTypeDescriptionDefault
kms_key_arnstringThe ARN for the KMS encryption key. If this configuration is not provided when enull
exclude_resourcesstringDefine the resources that will not be destroyednull
older_thanstringOnly destroy resources that were created before a certain period"0d"
tagsmap(any)A map of tags to assign to the resources.null
cloudwatch_schedule_expressionstringDefine the aws cloudwatch event rule schedule expression"cron(0 22 ? * MON-FRI *)"
namestringDefine name to use for lambda function, cloudwatch event and iam role"everything"
custom_iam_role_arnstringCustom IAM role arn for the scheduling lambdanull
aws_regionslist(string)A list of one or more aws regions where the lambda will be apply, default use thnull
runtimestringLambda function runtime"python3.11"
Outputs (9)
nuke_lambda_function_last_modified — The date Lambda function was last modified
nuke_lambda_function_version — Latest published version of your Lambda function
scheduler_log_group_arn — The Amazon Resource Name (ARN) specifying the log group
lambda_iam_role_arn — The ARN of the IAM role used by Lambda function
nuke_function_name — The name of the Lambda function
nuke_lambda_invoke_arn — The ARN to be used for invoking Lambda function from API Gateway
scheduler_log_group_name — The name of the scheduler log group
lambda_iam_role_name — The name of the IAM role used by Lambda function
nuke_lambda_arn — The ARN of the Lambda function
Resources (7)
aws_cloudwatch_event_ruleaws_cloudwatch_event_targetaws_cloudwatch_log_groupaws_iam_roleaws_iam_role_policyaws_lambda_functionaws_lambda_permission
Details
FrameworkTerraform Module
LanguageHCL
Version3.0.0
Cloud AWS
★ Stars20
Forks15
Total downloads7.1k
Inputs9
Outputs9
Resources7
Examples1
LicenseApache-2.0
Namespacediodonfrost
Updated