This lambda functions sets tags on the autoscaled read replicas in the AWS Aurora cluster. Replica has to start with application-autoscaling- prefix.
module "rds_cluster_ro_set_tags" {
source = "git::git@gitlab.com:shipmonk-company/platform/tf-module/terraform-aws-rds-autoscaling-set-tags.git?ref=CHECK_CHANGELOG_FOR_THE_LATEST_VERSION"
rds_cluster_identifier = module.prod-aurora.cluster_identifier
tags = var.tags
push_tags = merge(
local.prod_aurora_tags,
{
"rds_autoscaled_instance" = "True"
}
)
}Install pre-commit hooks by running following commands:
brew install pre-commit
pre-commit installNo requirements.
| Name | Version |
|---|---|
| archive | n/a |
| aws | n/a |
| null | n/a |
No modules.
| Name | Type |
|---|---|
| aws_cloudwatch_event_rule.read_replica_created | resource |
| aws_cloudwatch_event_target.read_replica_target | resource |
| aws_iam_role.lambda_exec_role | resource |
| aws_iam_role_policy.lambda_permissions | resource |
| aws_lambda_function.lambda | resource |
| aws_lambda_permission.allow_eventbridge | resource |
| null_resource.lambda_builder | resource |
| archive_file.lambda_zip | data source |
| aws_iam_policy_document.lambda_assume_role_policy | data source |
| aws_iam_policy_document.lambda_permissions_policy | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| do_not_creat_event_bridge | If set to true, the event bridge rule will not be created | bool |
false |
no |
| push_tags | Tags to be pushed to the new scaled read replica | map(string) |
{} |
no |
| rds_cluster_identifier | The identifier of the RDS cluster, used only for setting up event bridge and tf resources naming | any |
n/a | yes |
| tags | A map of tags to add to all resources | map(string) |
{} |
no |
No outputs.