Improving the maintainability and developer experience of Terraform code
Valtanen, Valtteri (2023)
Valtanen, Valtteri
2023
Tietotekniikan DI-ohjelma - Master's Programme in Information Technology
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2023-08-10
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202306206867
https://urn.fi/URN:NBN:fi:tuni-202306206867
Tiivistelmä
Infrastructure as code is a popular way to describe and manage cloud infrastructure, allowing developers to manage infrastructure along with all other code. Infrastructure as code is however often neglected, resulting in increasing technical debt and hindrance to maintenance and further development possibilities.
This thesis improves the infrastructure as code implementation of a case project through a constructive research approach. The case project is a production-use multienvironment infrastructure, implemented with Terraform and running on Google Cloud. The shortcomings of the case project were divided into seven action points, each of which was planned and implemented separately. Based on the results of the implementation, a set of best practices for working with infrastructure as code, Terraform and Google Cloud was compiled.
The implementation of the action points was successful, improving the case project significantly. Most important improvement to the case project was the implementation of the stack of modules approach to declaring multiple environments. All in all the implementation shortened the infrastructure as code with some 2400 lines and reduced the need for tedious manual work. In addition, the thesis reaffirmed existing practices and conventions, but did not discover any new significant contributions. The same rules of law apply to infrastructure as code as to all other code. The thesis also verified that making fundamental changes to a production-use infrastructure as code implementation does not pose any blocking issues.
This thesis improves the infrastructure as code implementation of a case project through a constructive research approach. The case project is a production-use multienvironment infrastructure, implemented with Terraform and running on Google Cloud. The shortcomings of the case project were divided into seven action points, each of which was planned and implemented separately. Based on the results of the implementation, a set of best practices for working with infrastructure as code, Terraform and Google Cloud was compiled.
The implementation of the action points was successful, improving the case project significantly. Most important improvement to the case project was the implementation of the stack of modules approach to declaring multiple environments. All in all the implementation shortened the infrastructure as code with some 2400 lines and reduced the need for tedious manual work. In addition, the thesis reaffirmed existing practices and conventions, but did not discover any new significant contributions. The same rules of law apply to infrastructure as code as to all other code. The thesis also verified that making fundamental changes to a production-use infrastructure as code implementation does not pose any blocking issues.