E7 · Com2us Platform · Feb 2023 – Feb 2026
One codebase instead of copied infrastructure code
Moved live infrastructure into code, removed duplication, and cut deployment time 40%
-40% deploy time
- Terraform
- Terragrunt
- IaC
- AWS
- GCP
In one line
Moved live infrastructure into code and replaced copied Terraform with a shared Terragrunt structure, cutting deployment time 40%.
Background
I moved live infrastructure, including StarSeed: Asnia Trigger (AWS, 50 servers and 20 databases), into IaC (managing infrastructure as code).
The same restructuring was applied to the Summoners War: Sky Arena environment.
Problem
Each environment (dev, staging, production) and each game used nearly identical Terraform code, copied by hand.
One change meant editing many places, and settings slowly drifted apart between environments.
What I did
I restructured the code with Terragrunt (a tool for reusing Terraform across environments without repetition).
- Shared modules and common settings (state storage location, cloud connection settings) are inherited from one place
- Each environment keeps only what differs
Structure example (for illustration)
infra/
├── modules/ # shared modules (with security defaults)
│ ├── network/
│ ├── security-group/
│ └── server/
├── terragrunt.hcl # common settings (state location, etc.)
└── game-a/
├── dev/
│ └── terragrunt.hcl # only what differs in dev
├── stg/
│ └── terragrunt.hcl
└── prod/
└── terragrunt.hclResult
Deployment time dropped 40%.
A security default added to a shared module now applies to every environment at once.