Skip to content

ASG Migration Plan

Current State

All 4 EC2 instances are standalone. The ASG module exists at tofu/modules/asg but is gated behind create_asg = false.

Migration Steps

  1. Set create_asg = true in tofu/accounts/nhc/terraform.tfvars
  2. Run tofu plan to review ASG creation
  3. Run tofu apply — both standalone EC2 and ASG will coexist
  4. Register ASG instances with ALB target groups
  5. Verify health checks pass on ASG instances
  6. Drain and terminate standalone EC2 instances
  7. Remove standalone EC2 module references

Benefits

  • Auto-healing: unhealthy instances are replaced automatically
  • Scaling: scale out during load spikes
  • Rolling updates: zero-downtime deployments via launch template versions

Risk Mitigation

  • ASG runs alongside existing EC2 instances (no downtime during migration)
  • Controlled via create_asg variable — easy rollback
  • Test with non-HIPAA workloads (foursites) first

Status

This migration is planned for after MWE production data handover.