Giter Club home page Giter Club logo

tf_aws_aurora's Introduction

tf_aws_aurora

Terraform module for deploying and managing AWS Aurora

This module

  • we encrypt everything and make a kms id for you
  • future enhancement to make kms_key_id optional, so if you do pass it it'll use it, and if you don't it'll create the kms key id for you

Required

  • azs - "A list of Availability Zones in the Region"
  • cluster_size - "Number of cluster instances to create"
  • env - "env to deploy into, should typically dev/staging/prod"
  • name - "Name for the Redis replication group i.e. cmsCommon"
  • subnets - "List of subnet IDs to use in creating RDS subnet group (must already exist)"
  • vpc_id - "VPC ID"
see aws_rds_cluster documentation for these variables
  • database_name
  • master_username
  • master_password

Optional

  • backup_retention_period - "The days to retain backups for defaults to 30"
  • db_port - "defaults to 3306"
  • allowed_cidr - "A list of CIDR addresses that can access the cluster. Defaults to ["127.0.0.1/32"]"
  • allowed_security_groups - "A list of Security Group ID's to allow access to. Defaults to empty list"
  • preferred_backup_window - "The daily time range in UTC during which automated backups are created. Default to 01:00-03:00"
  • instance_class - "Instance class to use when creating RDS cluster. Defaults to db.t2.medium"
  • storage_encrypted - "Defaults to true"
  • apply_immediately - "Defaults to false"
  • iam_database_authentication_enabled - "Whether to enable IAM database authentication. Detaults to false"
  • engine - "Name of the db Engine for Aurora mysql 5.7 use aurora-mysql. Defaults to Aurora mysql 5.6"
  • major_engine_version - "Name of the major engine. Defaults to 5.6"
  • family - "Name of the family db parameter group for 5.7 use aurora-mysql5.7. Defaults to Aurora aurora5.6"

Usage

module "aurora" {
  source = "github.com/terraform-community-modules/tf_aws_aurora?ref=1.0.0"
  azs                     = "${var.azs}"
  env                     = "${var.env}"
  name                    = "thtest"
  subnets                 = "${module.vpc.database_subnets}"
  vpc_id                  = "${module.vpc.vpc_id}"
  cluster_size            = "2"
  allowed_cidr            = ["10.10.10.0/24", "10.10.20.0/24"]
  allowed_security_groups = ["sg-24f4655b"]
  database_name           = "thtest"
  master_username         = "tim"
  master_password         = "test1234"
  backup_retention_period = "1"
  #preferred_backup_window = ""
  
  cluster_parameters = [
    {
      name  = "binlog_checksum"
      value = "NONE"
    },
    {
      name         = "binlog_format"
      value        = "statement"
      apply_method = "pending-reboot"
    }
  ]
  
  db_parameters = [
    {
      name  = "long_query_time"
      value = "2"
    },
    {
      name  = "slow_query_log"
      value = "1"
    }
  ]

}

Outputs

  • rds_cluster_id
  • writer_endpoint
  • reader_endpoint
  • security_group_id

Authors

Tim Hartmann

License

tf_aws_aurora's People

Contributors

antonbabenko avatar gurpalw avatar hakamadare avatar lcrisci avatar tfhartmann avatar vinay-ux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tf_aws_aurora's Issues

Migrate code to the terraform-aws-modules/terraform-aws-rds-aurora and publish in the registry

Hi @hakamadare and @tfhartmann,

Could you please migrate this module to https://github.com/terraform-aws-modules/terraform-aws-rds-aurora ?

Send pull-requests, and we discuss the process as we go. This module is a good candidate to be very feature-rich and powerful. Look into https://github.com/terraform-aws-modules/terraform-aws-rds for inspiration, it has similar types of resources.

Maybe we should even implement Aurora as submodule inside RDS module right away? What do you think?

Thanks,
Anton.

not found for variable 'aws_rds_cluster_parameter_group.aurora_cluster_parameter_group.id'

I understand this repo has been abandoned, but there is no better aurora module I can start with. I try it now.

But I get this error, any hints for me?

Error: Error running plan: 1 error(s) occurred:

* aws_rds_cluster.aurora: 1 error(s) occurred:

* aws_rds_cluster.aurora: Resource 'aws_rds_cluster_parameter_group.aurora_cluster_parameter_group' not found for variable 'aws_rds_cluster_parameter_group.aurora_cluster_parameter_group.id'

I have added depends_on in resource "aws_rds_cluster", I still get this error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.