Giter Site home page Giter Site logo

sday847 / aws-terraform-aurora Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rackspace-infrastructure-automation/aws-terraform-aurora

0.0 0.0 0.0 108 KB

AWS Aurora Terraform Module for Rackspace customers.

License: MIT License

HCL 100.00%

aws-terraform-aurora's Introduction

aws-terraform-aurora

This module creates an aurora RDS cluster. The module currently supports the aurora, aurora-mysql, and aurora-postgres engines.

The module will output the required configuration files to enable client and worker node setup and configuration.

Basic Usage

module "aurora_master" {
  source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-aurora//?ref=v0.12.1"

  binlog_format = "MIXED"
  engine        = "aurora"

  instance_availability_zone_list = [
    "us-west-2a",
    "us-west-2b",
    "us-west-2c",
  ]

  instance_class    = "db.t2.medium"
  name              = "sample-aurora-master"
  password          = "${data.aws_kms_secrets.rds_credentials.plaintext["password"]}"
  replica_instances = 2
  security_groups   = ["${module.vpc.default_sg}"]
  storage_encrypted = true
  subnets           = "${module.vpc.private_subnets}"
}

Full working references are available at examples

Other TF Modules Used

Using aws-terraform-cloudwatch_alarm to create the following CloudWatch Alarms:

  • high_cpu
  • write_io_high
  • read_io_high

Providers

Name Version
aws >= 2.7.0
null n/a

Inputs

Name Description Type Default Required
alarm_cpu_limit CloudWatch CPUUtilization Threshold number 60 no
alarm_read_iops_limit CloudWatch Read IOPSLimit Threshold number 60 no
alarm_write_iops_limit CloudWatch Write IOPSLimit Threshold number 100000 no
auto_minor_version_upgrade Boolean value that indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window bool true no
backtrack_window The target backtrack window, in seconds. Defaults to 1 day. Setting only affects supported versions (currently MySQL 5.6). Disable by setting to '0'. number 86400 no
backup_retention_period The number of days for which automated backups are retained. The permissible range is a value between 1-35. The aurora service defaults to 1 day but this module defaults to 35. Rackspace best practice is 30+ days. number 35 no
backup_window The daily time range during which automated backups are created if automated backups are enabled. string "05:00-06:00" no
binlog_format Sets the desired format. Defaults to OFF. Should be set to MIXED if this Aurora cluster will replicate to another RDS Instance or cluster. Ignored for aurora-postgresql engine string "OFF" no
cloudwatch_exports_logs_list List of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: audit, error, general, slowquery. list(string) [] no
cluster_internal_record_name The full record name you would like to add as a CNAME for the cluster that matches your Hosted Zone. i.e. cluster.example.com string "" no
cluster_parameters List of custom cluster parameters to apply to the parameter group. list(string) [] no
create_internal_zone_record Create an internal Route 53 record for the RDS cluster and cluster reader. Default is false. bool false no
db_snapshot_arn The identifier for the DB cluster snapshot from which you want to restore. string "" no
dbname The DB name to create. If omitted, no database is created initially string "" no
enable_delete_protection If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false bool false no
engine Database Engine Type. Allowed values: aurora-mysql, aurora, aurora-postgresql string "aurora-mysql" no
engine_mode The database engine mode. Allowed values: provisioned and global(aurora engine only). string "provisioned" no
engine_version Database Engine Minor Version http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html string "" no
environment Application environment for which this network is being created. one of: ('Development', 'Integration', 'PreProduction', 'Production', 'QA', 'Staging', 'Test') string "Development" no
existing_cluster_parameter_group_name The existing cluster parameter group to use for this instance. (OPTIONAL) string "" no
existing_monitoring_role ARN of an existing enhanced monitoring role to use for this instance. (OPTIONAL) string "" no
existing_parameter_group_name The existing parameter group to use for this instance. (OPTIONAL) string "" no
existing_subnet_group The existing DB subnet group to use for this cluster (OPTIONAL) string "" no
family Parameter Group Family Name (ex. aurora5.6, aurora-postgresql9.6, aurora-mysql5.7) string "" no
global_cluster_identifier Global Cluster identifier. Property of aws_rds_global_cluster (Ignored if engine_mode is not 'global'). string "" no
instance_availability_zone_list List of availability zones to place each aurora instance. Availability zone assignment is by index. The first AZ in the list is assigned to the first instance,
second AZ in the list to the second instance, third AZ in the list to the third instance, etc. Also please remember that the number of AZs specified here should equal to replica_instances + 1.
list(string)
[
""
]
no
instance_class The database instance type. string n/a yes
internal_zone_id The zone id you would like the internal records for the cluster and reader to be created in. i.e. Z2QHD5YD1WXE9M string "" no
kms_key_id KMS Key Arn to use for storage encryption. (OPTIONAL) string "" no
maintenance_window The weekly time range (in UTC) during which system maintenance can occur. string "Sun:07:00-Sun:08:00" no
monitoring_interval The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. number 0 no
name The name prefix to use for the resources created in this module. string n/a yes
notification_topic List of SNS Topic ARNs to use for customer notifications from CloudWatch alarms. (OPTIONAL) list(string) [] no
options List of custom options to apply to the option group. list(string) [] no
parameters List of custom parameters to apply to the parameter group. list(string) [] no
password Password for the local administrator account. string n/a yes
performance_insights_enable Specifies whether Performance Insights is enabled or not. bool false no
performance_insights_kms_key_id (Optional) The ARN for the KMS key to encrypt Performance Insights data. When specifying performance_insights_kms_key_id, performance_insights_enabled needs to be set to true. string "" no
port The port on which the DB accepts connections string "" no
publicly_accessible Boolean value that indicates whether the database instances are Internet-facing. bool false no
rackspace_alarms_enabled Specifies whether non-emergency rackspace alarms will create a ticket. bool false no
rackspace_managed Boolean parameter controlling if instance will be fully managed by Rackspace support teams, created CloudWatch alarms that generate tickets, and utilize Rackspace managed SSM documents. bool true no
reader_internal_record_name The full record name you would like to add as a CNAME for the cluster reader. i.e. reader.example.com string "" no
replica_instances The number of Aurora replica instances to create. This can range from 0 to 15. number 1 no
security_groups A list of EC2 security groups to assign to this resource list(string) n/a yes
skip_final_snapshot Boolean value to control if the DB Cluster will take a final snapshot when destroyed. This value should be set to false if a final snapshot is desired. bool false no
source_cluster The cluster ID of the master Aurora cluster that will replicate to the created cluster. The master must be in a different region. Leave this parameter blank to create a master Aurora cluster. string "" no
source_region The region of the master Aurora cluster that will replicate to the created cluster. The master must be in a different region. Leave this parameter blank to create a master Aurora cluster. string "" no
storage_encrypted Specifies whether the DB instance is encrypted bool false no
subnets Subnets for RDS Instances list(string) n/a yes
tags Custom tags to apply to all resources. map(string) {} no
username The name of master user for the client DB instance. string "dbadmin" no

Outputs

Name Description
cluster_endpoint_address The DNS address of the RDS cluster
cluster_endpoint_port The port of the RDS cluster
cluster_endpoint_reader A read-only endpoint for the Aurora cluster
cluster_id The DB Cluster identifier
db_instance The DB instance identifier
monitoring_role The IAM role used for Enhanced Monitoring
parameter_group The Parameter Group used by the DB Instance
subnet_group The DB Subnet Group used by the DB Instance

aws-terraform-aurora's People

Contributors

cwgem avatar gdelvalle avatar bohn002 avatar twistedgrim avatar mjcmtb avatar jonathan-madison avatar stevengorrell avatar michaelmoussa avatar

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.