Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 3.51 KB

File metadata and controls

75 lines (56 loc) · 3.51 KB

Terraform AWS RDS autoscaled read replica set tags

This lambda functions sets tags on the autoscaled read replicas in the AWS Aurora cluster. Replica has to start with application-autoscaling- prefix.

Usage

module "rds_cluster_ro_set_tags" {
  source = "git::[email protected]: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"
    }
  )
}

Before you do anything in this module

Install pre-commit hooks by running following commands:

brew install pre-commit
pre-commit install

Requirements

No requirements.

Providers

Name Version
archive n/a
aws n/a
null n/a

Modules

No modules.

Resources

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

Inputs

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

Outputs

No outputs.