MCMMCMBy Revdau
User Guide

Workspaces and Terraform with AI

Describe your infrastructure and get a workspace draft and Terraform files to review before anything is created.

Describe the infrastructure you need and the AI assistant drafts a workspace and the Terraform to go with it. You review everything; nothing is created or changed until you say so.

Draft a workspace from a description

  1. In any chat, type /create-workspace followed by what you need, for example /create-workspace A reusable workspace for application logs with a monthly drift check. You can also just describe it in the chat.
  2. The assistant answers with a workspace draft card showing the name, description, where the Terraform comes from, a stack name when you are building a reusable stack, whether drift detection is on and its schedule, and why it chose these settings.
  3. In the background it also generates Terraform for the draft. Open View generated Terraform on the card to read the files.
  4. Click Fill workspace. The workspace wizard opens with the draft filled in, ready for you to review.

The draft only prefills the wizard. Nothing exists until you complete the wizard yourself, including the plan and approval steps. See Orchestration.

If your request leaves out something important, such as which cloud components or features you want, the assistant asks first. See AI assistant.

Generate Terraform for a workspace or stack

When you create a workspace or a stack, you can have the assistant write the files.

  1. In the workspace wizard, choose Terraform Files as the source, or in the stack wizard open the files step, then click Generate with AI. For a workspace, set its details first.
  2. The assistant opens in a new chat that knows which workspace or stack you are working on. Describe what you want, for example a VPC with two subnets and an EC2 instance.
  3. It returns four files: provider.tf, variables.tf, main.tf and outputs.tf. Values that someone might want to change, such as region, instance type, names and CIDR blocks, are declared as variables rather than written into the code, so you supply them later.
  4. Read the files in the chat, then click Upload All, or the upload button on a single file, to add them to the workspace or stack.

Without an open workspace or stack the files are shown but cannot be uploaded; the chat says Connect workspace to upload.

Uploaded files are ordinary Terraform files. They go through the same plan, cost estimate and approval as files you wrote yourself, so the AI step replaces the authoring, not the controls.

An AI provider must be connected first. See AI provider setup.

On this page