Optimizing Service Deployments With NLP Based Infrastructure Code Generation - An Automation Framework
Hariharan Ragothaman, Saai Krishnan Udayakumar · 2024
In this paper we discuss how we combine natural language processing (NLP) techniques and infrastructure as code (IaC) tools like Terraform; to build a framework that converts natural language queries into Terraform code, enabling users to generate multi-cloud infrastructure configurations. We detail the construction of the NLP engine, the implementation for benchmarking various context-aware models, and the validation and execution of code, which leads to the integration of the model with DevSecOps pipelines. For benchmarking, we test models such as RoBERTa, GPT-4, T5 and Llama on their performance in terms of accuracy, latency and capacity to translate complex infrastructure requirements given as conversational queries into deployable terraform configuration. On one hand, this framework enhances the accessibility and efficiency of writing Terraform code (TF-code), while on the other, it results in a 73% reduction in the overall time required to bring a service from development to production deployment, relative to comparable efforts performed through manual processes. This modularity allows the entire framework to be customized and integrated into larger systems, especially in a DevSecOps context where flexibility and extensibility are crucial. Finally, the paper provides both technical insights and practical benchmarks, offering a comprehensive solution for organizations seeking to optimize cloud service deployment pipelines using advanced NLP techniques.