conditional-resource-presence
Prefer stable Terraform resource presence or an explicit review justification.
Why
Conditional zero/empty instance selections duplicate provisioning paths and introduce indexed resource references. Temporary migration switches can outlive the migration and obscure the intended topology.
Fix
Prefer a direct migration and stable resource declarations. If optional provisioning is necessary, justify its lifetime and ownership in the PR or input description. Preserve state addresses and restore/cutover ordering when simplifying an existing deployment.
Examples
resource "example_service" "this" { count = var.use_new ? 1 : 0}resource "example_service" "this" {}