Prompt-Based Secure Incremental State Management For Multi-Cloud Service Automation Using Terraform And Large Language Models

Authors

  • Pali Deepak Phani Krishna
  • Dr. Sunitha Pachala

DOI:

https://doi.org/10.51483/IJAIML.6.9s.2026.1748-1758

Keywords:

Terraform, Infrastructure as Code, Large Language Models, State Management, Multi-Cloud, Idempotency, DevOps Automation, Secure Provisioning

Abstract

Prior work on prompt-driven multi-cloud provisioning demonstrated that Large Language Models (LLMs) can translate natural-language requests into Terraform configurations, dramatically reducing the time needed to provision infrastructure on AWS, Azure, and Google Cloud Platform (GCP). However, that system operated statelessly: it did not persist or reference a Terraform state file between sessions, so every prompt was treated as a fresh deployment. This caused destructive re-provisioning, in which existing resources were unnecessarily destroyed and recreated, resulting in downtime, potential data loss, and violation of the idempotency principle that Infrastructure-as-Code (IaC) systems are expected to uphold. This paper proposes a solution to that limitation: a secure, minimal state-referencing model in which only abstracted metadataresource type, resource count, and a non-identifying logical alias is persisted and exposed to the LLM, while sensitive identifying details such as names, IP addresses, ARNs, and endpoints remain solely inside an encrypted Terraform backend and are never transmitted to the language model. Using this abstracted summary alongside the user's prompt, the LLM is guided to generate targeted update operations matching, importing, or modifying existing resources instead of regenerating infrastructure from scratch. The proposed design is evaluated conceptually against the destructive-recreation baseline of the earlier system and demonstrated on a live AWS deployment sequence, showing improvements in idempotency, data-loss risk, security posture, and update latency, while keeping the system's original goal of simple, prompt-driven, non-expert-friendly multi-cloud management intact.

Downloads

Published

2026-09-05

How to Cite

Krishna, P. D. P., & Pachala, D. S. (2026). Prompt-Based Secure Incremental State Management For Multi-Cloud Service Automation Using Terraform And Large Language Models. International Journal of Artificial Intelligence and Machine Learning, 6(9s), 1748–1758. https://doi.org/10.51483/IJAIML.6.9s.2026.1748-1758