90DaysOfDevOps/Days/day61.md

1.9 KiB

Kubernetes & Multiple Environments

Kubernetes Demo

terraform init

Multiple Environments

If we wanted to take any of the demos we have ran through but wanted to now have specific production, staging and development environments looking exactly the same and leveraging this code there are two approaches to achieve this with Terraform

  • terraform workspaces - multiple named sections within a single backend

  • file structure - Directory layout provides separation, modules provide reuse.

Each of the above do have their pros and cons though.

terraform workspaces

Pros

Cons

Resources

I have listed a lot of resources down below and I think this topic has been covered so many times out there, If you have additional resources be sure to raise a PR with your resources and I will be happy to review and add them to the list.

See you on Day 57