{"id":13505661,"url":"https://github.com/azavea/terraform-aws-postgresql-rds","last_synced_at":"2025-10-07T21:46:20.932Z","repository":{"id":64030616,"uuid":"46007776","full_name":"azavea/terraform-aws-postgresql-rds","owner":"azavea","description":"A Terraform module to create an Amazon Web Services (AWS) PostgreSQL Relational Database Server (RDS).","archived":false,"fork":false,"pushed_at":"2023-06-20T20:28:38.000Z","size":97,"stargazers_count":85,"open_issues_count":8,"forks_count":69,"subscribers_count":20,"default_branch":"develop","last_synced_at":"2024-04-14T05:37:23.695Z","etag":null,"topics":["amazon-web-services","aws","postgresql","rds","terraform","terraform-modules"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azavea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-11-11T20:23:14.000Z","updated_at":"2024-01-06T08:09:18.000Z","dependencies_parsed_at":"2022-12-01T01:03:21.689Z","dependency_job_id":"9fb2fbd2-f07b-41ab-81f8-63ea1255c662","html_url":"https://github.com/azavea/terraform-aws-postgresql-rds","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/azavea/terraform-aws-postgresql-rds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fterraform-aws-postgresql-rds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fterraform-aws-postgresql-rds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fterraform-aws-postgresql-rds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fterraform-aws-postgresql-rds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azavea","download_url":"https://codeload.github.com/azavea/terraform-aws-postgresql-rds/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azavea%2Fterraform-aws-postgresql-rds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271416711,"owners_count":24755936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-web-services","aws","postgresql","rds","terraform","terraform-modules"],"created_at":"2024-08-01T00:01:11.296Z","updated_at":"2025-10-07T21:46:20.851Z","avatar_url":"https://github.com/azavea.png","language":"HCL","funding_links":[],"categories":["Community Modules"],"sub_categories":["Miscellaneous"],"readme":"# terraform-aws-postgresql-rds\n\n[![CircleCI](https://circleci.com/gh/azavea/terraform-aws-postgresql-rds.svg?style=svg)](https://circleci.com/gh/azavea/terraform-aws-postgresql-rds)\n\nA Terraform module to create an Amazon Web Services (AWS) PostgreSQL Relational Database Server (RDS).\n\n## Usage\n\n```hcl\nmodule \"postgresql_rds\" {\n  source = \"github.com/azavea/terraform-aws-postgresql-rds\"\n  vpc_id = \"vpc-20f74844\"\n  allocated_storage = \"32\"\n  engine_version = \"9.4.4\"\n  instance_type = \"db.t2.micro\"\n  storage_type = \"gp2\"\n  database_identifier = \"jl23kj32sdf\"\n  database_name = \"hector\"\n  database_username = \"hector\"\n  database_password = \"secret\"\n  database_port = \"5432\"\n  backup_retention_period = \"30\"\n  backup_window = \"04:00-04:30\"\n  maintenance_window = \"sun:04:30-sun:05:30\"\n  auto_minor_version_upgrade = false\n  multi_availability_zone = true\n  storage_encrypted = false\n  subnet_group = aws_db_subnet_group.default.name\n  parameter_group = aws_db_parameter_group.default.name\n  monitoring_interval = \"60\"\n  deletion_protection = true\n  cloudwatch_logs_exports = [\"postgresql\"]\n\n  alarm_cpu_threshold = \"75\"\n  alarm_disk_queue_threshold = \"10\"\n  alarm_free_disk_threshold = \"5000000000\"\n  alarm_free_memory_threshold = \"128000000\"\n  alarm_actions = [\"arn:aws:sns...\"]\n  ok_actions = [\"arn:aws:sns...\"]\n  insufficient_data_actions = [\"arn:aws:sns...\"]\n\n  project = \"Something\"\n  environment = \"Staging\"\n}\n```\n\n### Note about Enhanced Monitoring support\n\nIf the `monitoring_interval` passed as an input to this module is `0`, an empty `monitoring_role_arn` value will be passed to the `aws_db_instance` resource. \n\nThis is because, if a value for `monitoring_role_arn` is passed to an `aws_db_instance`, along with a `monitoring_interval` of `0`, the following error will occur:\n\n```\nInvalidParameterCombination: You must specify a MonitoringInterval value other than 0 when you specify a MonitoringRoleARN value.\n```\n\nIf you're curious to know more, see the discussion within https://github.com/terraform-providers/terraform-provider-aws/issues/315.\n\n## Variables\n\n- `vpc_id` - ID of VPC meant to house database\n- `project` - Name of project this VPC is meant to house (default: `Unknown`)\n- `environment` - Name of environment this VPC is targeting (default: `Unknown`)\n- `allocated_storage` - Storage allocated to database instance (default: `32`)\n- `engine_version` - Database engine version (default: `11.5`)\n- `instance_type` - Instance type for database instance (default: `db.t3.micro`)\n- `storage_type` - Type of underlying storage for database (default: `gp2`)\n- `iops` - The amount of provisioned IOPS. Setting this implies a `storage_type` of `io1` (default: `0`)\n- `database_identifier` - Identifier for RDS instance\n- `snapshot_identifier` - The name of the snapshot (if any) the database should be created from\n- `database_name` - Name of database inside storage engine\n- `database_username` - Name of user inside storage engine\n- `database_password` - Database password inside storage engine\n- `database_port` - Port on which database will accept connections (default `5432`)\n- `backup_retention_period` - Number of days to keep database backups (default:\n  `30`)\n- `backup_window` - 30 minute time window to reserve for backups (default:\n  `04:00-04:30`)\n- `maintenance_window` - 60 minute time window to reserve for maintenance\n  (default: `sun:04:30-sun:05:30`)\n- `auto_minor_version_upgrade` - Minor engine upgrades are applied automatically\n to the DB instance during the maintenance window (default: `true`)\n- `final_snapshot_identifier` - Identifier for final snapshot if `skip_final_snapshot` is set to `false` (default: `terraform-aws-postgresql-rds-snapshot`)\n- `skip_final_snapshot` - Flag to enable or disable a snapshot if the database instance is terminated (default: `true`)\n- `copy_tags_to_snapshot` - Flag to enable or disable copying instance tags to the final snapshot (default: `false`)\n- `multi_availability_zone` - Flag to enable hot standby in another availability\n  zone (default: `false`)\n- `storage_encrypted` - Flag to enable storage encryption (default: `false`)\n- `monitoring_interval` - The interval, in seconds, between points when Enhanced Monitoring metrics are collected (default: `0`)\n- `deletion_protection` - Flag to protect the database instance from deletion (default: `false`)\n- `cloudwatch_logs_exports` - List of logs to publish to CloudWatch Logs. See [all](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.PostgreSQL.html#USER_LogAccess.PostgreSQL.PublishtoCloudWatchLogs) available options. (default: `[\"postgresql, \"upgrade\"]`)\n- `subnet_group` - Database subnet group\n- `parameter_group` - Database engine parameter group (default:\n  `default.postgres11`)\n- `alarm_cpu_threshold` - CPU alarm threshold as a percentage (default: `75`)\n- `alarm_disk_queue_threshold` - Disk queue alarm threshold (default: `10`)\n- `alarm_free_disk_threshold` - Free disk alarm threshold in bytes (default: `5000000000`)\n- `alarm_free_memory_threshold` - Free memory alarm threshold in bytes (default: `128000000`)\n- `alarm_cpu_credit_balance_threshold` - CPU credit balance threshold (default: `30`). Only used for `db.t*` instance types\n- `alarm_actions` - List of ARNs to be notified via CloudWatch when alarm enters ALARM state\n- `ok_actions` - List of ARNs to be notified via CloudWatch when alarm enters OK state\n- `insufficient_data_actions` - List of ARNs to be notified via CloudWatch when alarm enters INSUFFICIENT_DATA state\n- `tags` - Extra tags to attach to the RDS resources (default: `{}`)\n\n## Outputs\n\n- `id` - The database instance ID\n- `database_security_group_id` - Security group ID of the database\n- `hosted_zone_id` - The zone id for the autogenerated DNS name given in `endpoint`. \n- `hostname` - Public DNS name of database instance\n- `port` - Port of database instance\n- `endpoint` - Public DNS name and port separated by a colon\n   Use this when creating a short-name DNS [alias](https://www.terraform.io/docs/providers/aws/r/route53_record.html#alias-record) for the `endpoint` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazavea%2Fterraform-aws-postgresql-rds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazavea%2Fterraform-aws-postgresql-rds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazavea%2Fterraform-aws-postgresql-rds/lists"}