Terraform reference / skel Control Repo for building for building multi-tier services
Terraform Control repo built following the pattern as outlined by Charity Majors
TLDR, but really, go read the post, it's way better then what I'm going to write here..
The Current production terraform version can be found here
git clone https://github.com/FitnessKeeper/terraform-reference terraform-<project name>
terraform-<project name>
)
spike
make sure you update TF_SPINE in env if something other then rk
is needed, at the time of this writing rk
and asics
are valid spines.spikes
update to TF_LOCK_TABLE=asics-services-terraformStateLock
stack
variable./init-variables.tf.sh
git remote rm origin
git remote add origin https://github.com/FitnessKeeper/terraform-<project name>.git
git push -u origin master
cd
into the base dir for the env you want to work on
cd terraform-<service>/env-development/
./init.sh
# to initialize your environmentterraform get
# to load your modulesterraform plan -var-file=development.tfvars
# manage all the things!We are trying to follow a pattern where we have an infrastructure repo with 3 tiers - dev, stage, and production, known as FitnessKeeper/terraform-runkeeper. We will use that control repo to build VPC, ECS Clusters, DNS Zones, and other resources that can be presented as a platform for use by services.
Services, will be created using atomic control repos, based off this skel, and have distinct state files for each of the tiers. In this way, we can make changes to the state of a service living atop our infrastructure, without having to push stage changes to the underlying resources.