Skip to content

Adopt the 20 GiB RDS instance and stop managing the old one - #269

Merged
ale210 merged 2 commits into
mainfrom
267-adopt-shrunk-rds
Oct 17, 2026
Merged

ale210 merged 2 commits into
mainfrom
267-adopt-shrunk-rds

Conversation

@ale210

@ale210 ale210 commented Oct 17, 2026

Copy link
Copy Markdown
Member

Brings Terraform in line after the #267 migration window. The two instances swapped identifiers by CLI: the 20 GiB instance is now incubator-prod-database and the old 100 GiB one is incubator-prod-database-old.

  • aws_db_instance.default (the old instance) moves to a removed block with destroy = false, so Terraform stops managing it without deleting it. It gets deleted by hand later, with a final snapshot.
  • aws_db_instance.incubator_prod takes the identifier incubator-prod-database, matching what is live.

Expected plan: aws_db_instance.default leaves state, 0 to add, 0 to change, 0 to destroy, and no postgresql_* changes. Do not merge if the plan renames or replaces either instance.

Merge this before anything else on main. Until it lands, any apply would try to rename the live database back to incubator-prod-database-new.

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: 0 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:

Terraform will perform the following actions:

 # aws_db_instance.default will no longer be managed by Terraform, but will not be destroyed
 # (destroy = false is set in the configuration)
.  resource "aws_db_instance" "default" {
        id                                    = "db-WEFHC5MZIA5NX5PBTQZPC2STZQ"
        tags                                  = {
            "Name" = "incubator-prod-database"
        }
#        (74 unchanged attributes hidden)
    }

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

Warning: Some objects will no longer be managed by Terraform

If you apply this plan, Terraform will discard its tracking information for
the following objects, but it will not delete them:
-  aws_db_instance.default

After applying this plan, Terraform will no longer manage these objects. You
will need to import them into Terraform to manage them again.

✅ Plan applied in Terraform apply (OIDC) #109

@ale210
ale210 merged commit d23af83 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