Code Monkey home page Code Monkey logo

terraform-aws-postgresql-rds's Introduction

terraform-aws-postgresql-rds

A Terraform module to create an Amazon Web Services (AWS) PostgreSQL Relational Database Server (RDS).

Usage

module "postgresql_rds" {
  source = "github.com/azavea/terraform-aws-postgresql-rds"
  vpc_id = "vpc-20f74844"
  allocated_storage = "32"
  engine_version = "9.4.4"
  instance_type = "db.t2.micro"
  storage_type = "gp2"
  database_identifier = "jl23kj32sdf"
  database_name = "hector"
  database_username = "hector"
  database_password = "secret"
  database_port = "5432"
  backup_retention_period = "30"
  backup_window = "04:00-04:30"
  maintenance_window = "sun:04:30-sun:05:30"
  auto_minor_version_upgrade = false
  multi_availability_zone = true
  storage_encrypted = false
  subnet_group = "${aws_db_subnet_group.default.name}"
  parameter_group = "${aws_db_parameter_group.default.name}"

  alarm_cpu_threshold = "75"
  alarm_disk_queue_threshold = "10"
  alarm_free_disk_threshold = "5000000000"
  alarm_free_memory_threshold = "128000000"
  alarm_actions = ["arn:aws:sns..."]
  ok_actions = ["arn:aws:sns..."]
  insufficient_data_actions = ["arn:aws:sns..."]

  project = "Something"
  environment = "Staging"
}

Variables

  • vpc_id - ID of VPC meant to house database
  • project - Name of project this VPC is meant to house (default: Unknown)
  • environment - Name of environment this VPC is targeting (default: Unknown)
  • allocated_storage - Storage allocated to database instance (default: 32)
  • engine_version - Database engine version (default: 9.4.4)
  • instance_type - Instance type for database instance (default: db.t2.micro)
  • storage_type - Type of underlying storage for database (default: gp2)
  • database_identifier - Identifier for RDS instance
  • snapshot_identifier - The name of the snapshot (if any) the database should be created from
  • database_name - Name of database inside storage engine
  • database_username - Name of user inside storage engine
  • database_password - Database password inside storage engine
  • database_port - Port on which database will accept connections (default 5432)
  • backup_retention_period - Number of days to keep database backups (default: 30)
  • backup_window - 30 minute time window to reserve for backups (default: 04:00-04:30)
  • maintenance_window - 60 minute time window to reserve for maintenance (default: sun:04:30-sun:05:30)
  • auto_minor_version_upgrade - Minor engine upgrades are applied automatically to the DB instance during the maintenance window (default: true)
  • final_snapshot_identifier - Identifier for final snapshot if skip_final_snapshot is set to false (default: terraform-aws-postgresql-rds-snapshot)
  • skip_final_snapshot - Flag to enable or disable a snapshot if the database instance is terminated (default: true)
  • copy_tags_to_snapshot - Flag to enable or disable copying instance tags to the final snapshot (default: false)
  • multi_availability_zone - Flag to enable hot standby in another availability zone (default: false)
  • storage_encrypted - Flag to enable storage encryption (default: false)
  • subnet_group - Database subnet group
  • parameter_group - Database engine parameter group (default: default.postgres9.4)
  • alarm_cpu_threshold - CPU alarm threshold as a percentage (default: 75)
  • alarm_disk_queue_threshold - Disk queue alarm threshold (default: 10)
  • alarm_free_disk_threshold - Free disk alarm threshold in bytes (default: 5000000000)
  • alarm_free_memory_threshold - Free memory alarm threshold in bytes (default: 128000000)
  • alarm_cpu_credit_balance_threshold - CPU credit balance threshold (default: 30). Only used for db.t* instance types
  • alarm_actions - List of ARNs to be notified via CloudWatch when alarm enters ALARM state
  • ok_actions - List of ARNs to be notified via CloudWatch when alarm enters OK state
  • insufficient_data_actions - List of ARNs to be notified via CloudWatch when alarm enters INSUFFICIENT_DATA state

Outputs

  • id - The database instance ID
  • database_security_group_id - Security group ID of the database
  • hostname - Public DNS name of database instance
  • port - Port of database instance
  • endpoint - Public DNS name and port separated by a :
  • hosted_zone_id - The zone id for the autogenerated DNS name given in endpoint. Use this when creating a short-name DNS alias for the endpoint

terraform-aws-postgresql-rds's People

Contributors

dagvl avatar hectcastro avatar jeekajoo avatar olvesh avatar sharph avatar

Watchers

 avatar  avatar  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.