Skip to content

tundracom/terraform-aws-rds-cluster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-rds-cluster

Terraform module to provision an RDS Aurora Cluster

Usage

Include this repository as a module in your existing terraform code:

module "rds_cluster_aurora" {
  source              = "git::https://github.com/cloudposse/terraform-aws-rds-cluster.git?ref=master"
  cluster_size        = "2"
  namespace           = "app"
  stage               = "dev"
  name                = "db"
  admin_user          = "admin"
  admin_password      = "TestTest123"
  db_name             = "dbname"
  instance_type       = "db.t2.small"
  vpc_id              = "vpc-xxxxxxx"
  availability_zones  = ["us-east-1a", "us-east-1b"]
  security_groups     = ["sg-0a6d5a3a"]
  subnets             = ["subnet-8b03333", "subnet-8b0772a3"]
  zone_id             = "xxxxxxxx"
}

Input

Name Default Description
admin_password REQUIRED (Required unless a snapshot_identifier is provided) Password for the master DB user
admin_user "admin" (Required unless a snapshot_identifier is provided) Username for the master DB user
attributes [] Additional attributes (e.g. policy or role)
availability_zones REQUIRED List of Availability Zones that instances in the DB cluster can be created in
backup_window "07:00-09:00" Daily time range during which the backups happen
cluster_family "aurora5.6" The family of the DB cluster parameter group
cluster_parameters [] List of DB parameters to apply
cluster_size "2" Number of DB instances to create in the cluster
db_name REQUIRED Database name
db_port "3306" Database port
delimiter "-" Delimiter to be used between name, namespace, stage, etc.
instance_type "db.t2.small" Instance type to use
maintenance_window "wed:03:00-wed:04:00" Weekly time range during which system maintenance can occur, in UTC
name REQUIRED Name of the application
namespace REQUIRED Namespace (e.g. cp or cloudposse)
retention_period "5" Number of days to retain backups for
security_groups REQUIRED List of security groups to be allowed to connect to the DB instance
snapshot_identifier "" Specifies whether or not to create this cluster from a snapshot
stage REQUIRED Stage (e.g. prod, dev, staging)
subnets REQUIRED List of VPC subnet IDs
tags {} Additional tags (e.g. map('BusinessUnit,XYZ)
vpc_id REQUIRED VPC ID to create the cluster in (e.g. vpc-a22222ee)
zone_id REQUIRED Route53 parent zone ID. The module will create sub-domain DNS records in the parent zone for the DB master and replicas

Output

Name Description
cluster_name Cluster Identifier
master_host DB Master hostname
name Database name
password Password for the master DB user
replicas_host Replicas hostname
user Username for the master DB user

Help

Got a question?

File a GitHub issue, send us an email or reach out to us on Gitter.

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

If you are interested in being a contributor and want to get involved in developing terraform-aws-rds-cluster, we would love to hear from you! Shoot us an email.

In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

License

APACHE 2.0 © 2017 Cloud Posse, LLC

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

About

This project is maintained and funded by Cloud Posse, LLC. Like it? Please let us know at hello@cloudposse.com

We love Open Source Software!

See our other projects or hire us to help build your next cloud-platform.

Contributors

Erik Osterman
Erik Osterman
Igor Rodionov
Igor Rodionov
Andriy Knysh
Andriy Knysh
Sergey Vasilyev
Sergey Vasilyev

About

Terraform Module to define an RDS Aurora MySQL Cluster

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 98.8%
  • Makefile 1.2%