Skip to content

Add 20 GiB replacement for the shared RDS instance - #268

Merged
ale210 merged 2 commits into
mainfrom
267-shrink-rds-storage
Oct 17, 2026
Merged

ale210 merged 2 commits into
mainfrom
267-shrink-rds-storage

Conversation

@ale210

@ale210 ale210 commented Oct 17, 2026

Copy link
Copy Markdown
Member

First step of #267: adds aws_db_instance.incubator_prod (incubator-prod-database-new), a 20 GiB gp3 copy of the shared instance with autoscaling to 50 GiB. Data moves by dump/restore in a later window, then the two instances swap identifiers so the endpoint stays the same.

Expected plan: 1 to add, 0 to change, 0 to destroy. The existing instance must not change.

The master password comes from var.pgpassword via password_wo, so TF_VAR_PGPASSWORD stays valid and the value stays out of state.

After merge: confirm the new endpoint is incubator-prod-database-new.cewewwrvdqjn.us-west-2.rds.amazonaws.com.

Part of #267.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Terraform plan in terraform
With backend config files: terraform/prod.backend.tfvars

Plan: 1 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create

Terraform will perform the following actions:

  # aws_db_instance.incubator_prod will be created
+   resource "aws_db_instance" "incubator_prod" {
+       address                               = (known after apply)
+       allocated_storage                     = 20
+       allow_major_version_upgrade           = true
+       apply_immediately                     = true
+       arn                                   = (known after apply)
+       auto_minor_version_upgrade            = true
+       availability_zone                     = "us-west-2a"
+       backup_retention_period               = 4
+       backup_target                         = "region"
+       backup_window                         = "03:00-06:00"
+       ca_cert_identifier                    = "*****************"
+       character_set_name                    = (known after apply)
+       copy_tags_to_snapshot                 = true
+       customer_owned_ip_enabled             = false
+       database_insights_mode                = (known after apply)
+       db_name                               = (known after apply)
+       db_subnet_group_name                  = "incubator-prod"
+       dedicated_log_volume                  = false
+       delete_automated_backups              = true
+       deletion_protection                   = false
+       domain_fqdn                           = (known after apply)
+       enabled_cloudwatch_logs_exports       = [
+           "postgresql",
+           "upgrade",
        ]
+       endpoint                              = (known after apply)
+       engine                                = "postgres"
+       engine_lifecycle_support              = "open-source-rds-extended-support"
+       engine_version                        = "15"
+       engine_version_actual                 = (known after apply)
+       hosted_zone_id                        = (known after apply)
+       iam_database_authentication_enabled   = false
+       id                                    = (known after apply)
+       identifier                            = "incubator-prod-database-new"
+       identifier_prefix                     = (known after apply)
+       instance_class                        = "db.t3.small"
+       iops                                  = (known after apply)
+       kms_key_id                            = (known after apply)
+       latest_restorable_time                = (known after apply)
+       license_model                         = (known after apply)
+       listener_endpoint                     = (known after apply)
+       maintenance_window                    = (known after apply)
+       master_user_secret                    = (known after apply)
+       master_user_secret_kms_key_id         = (known after apply)
+       max_allocated_storage                 = 50
+       monitoring_interval                   = 0
+       monitoring_role_arn                   = (known after apply)
+       multi_az                              = false
+       nchar_character_set_name              = (known after apply)
+       network_type                          = "IPV4"
+       option_group_name                     = (known after apply)
+       parameter_group_name                  = "incubator-prod-postgres15"
+       password_wo                           = (write-only attribute)
+       password_wo_version                   = 1
+       performance_insights_enabled          = false
+       performance_insights_kms_key_id       = (known after apply)
+       performance_insights_retention_period = (known after apply)
+       port                                  = 5432
+       publicly_accessible                   = true
+       region                                = "us-west-2"
+       replica_mode                          = (known after apply)
+       replicas                              = (known after apply)
+       resource_id                           = (known after apply)
+       skip_final_snapshot                   = true
+       snapshot_identifier                   = (known after apply)
+       status                                = (known after apply)
+       storage_encrypted                     = false
+       storage_throughput                    = (known after apply)
+       storage_type                          = "gp3"
+       tags                                  = {
+           "Name" = "incubator-prod-database"
        }
+       tags_all                              = {
+           "Name"       = "incubator-prod-database"
+           "managed-by" = "terraform-incubator"
        }
+       timezone                              = (known after apply)
+       upgrade_rollout_order                 = (known after apply)
+       username                              = "postgres"
+       vpc_security_group_ids                = [
+           "sg-0ab8947eeb3d705ac",
        ]
    }

Plan: 1 to add, 0 to change, 0 to destroy.

✅ Plan applied in Terraform apply (OIDC) #108

@ale210
ale210 merged commit 4d33306 into main Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant