Generative AI for Infrastructure-as-Code Configurations in Response to Drift Detection
Infrastructure as Code (IaC) is an important tool in cloud computing. It allows you to manage and provision your infrastructure using code rather than manual configurations. However, manual and automated tasks are not a good collaboration in this case. To integrate a minor manual change in the code can be a labor-intensive and error-prone task.
The paper presents an overview of LLMs, emphasizing the importance of prompt engineering and benchmarking techniques in optimizing their performance. It further provides a background on IaC, highlighting the differences between stateful and stateless tools and the challenges that come with drift. The research focuses on evaluating the effectiveness of generative AI in two specific scenarios: a single-file IaC configuration and a multi-file configuration. In both cases, manual changes are done to the deployed infrastructure. Four prompting techniques are used to generate IaC code solutions. These solutions are benchmarked using the BLEU score to measure how accurate LLM is compared to human code.
The results reveal how well generative AI can assist developers in debugging manual changes with IaC configurations. A proof of concept implementation demonstrates the integration of these capabilities into a DevOps workflow. The paper concludes with a discussion of the findings, advise to improve and outlining future research directions to enhance the synergy between generative AI and IaC practices.