A Terraform module to delete the default VPCs in all regions when new AWS accounts are added or invited to an AWS Organization.
The Lambda function is triggered for the account by an Event Rule that matches the CreateAccountResult or InviteAccountToOrganization events. The function then describes the available regions, and deletes all resources associated with the default VPC in every region for that account.
Name | Version |
---|---|
terraform | >= 1.3 |
aws | >= 4.9 |
Name | Version |
---|---|
aws | >= 4.9 |
Name | Type |
---|---|
aws_iam_policy_document.lambda | data source |
aws_partition.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
project_name | Project name to prefix resources with | string |
n/a | yes |
assume_role_name | Name of the IAM role that the lambda will assume in the target account | string |
"OrganizationAccountAccessRole" |
no |
dry_run | Boolean toggle to control the dry-run mode of the lambda function | bool |
true |
no |
event_bus_name | Event bus name to create event rules in | string |
"default" |
no |
event_types | Event types that will trigger this lambda | set(string) |
[ |
no |
lambda | Object of optional attributes passed on to the lambda module | object({ |
{} |
no |
log_level | Log level for lambda | string |
"INFO" |
no |
max_workers | Number of worker threads to use to process delete | number |
20 |
no |
tags | Tags for resource | map(string) |
{} |
no |
No outputs.