Skip to main content

GitHub Codespaces Dev Environment

AutoCloud includes a ready-to-use dev container configuration so you can start contributing or using the project instantly in GitHub Codespaces (or any dev container-compatible tool like VS Code Dev Containers).

Quick Start​

  1. Navigate to the AutoCloud repository.
  2. Click Code → Codespaces → Create codespace on main.
  3. Wait for the container to build and the post-create setup to finish.
  4. Sign in to Azure with az login when prompted.

Option 2: VS Code Dev Containers (local)​

  1. Install Docker Desktop and the Dev Containers extension.
  2. Clone the repository and open it in VS Code.
  3. When prompted, click Reopen in Container (or run the command Dev Containers: Reopen in Container).
  4. Sign in to Azure with az login.

What's Included​

Base Image​

mcr.microsoft.com/devcontainers/base:ubuntu — a lightweight Ubuntu image maintained by Microsoft.

Dev Container Features​

FeatureVersionPurpose
Azure CLIlatestAzure resource management and deployments
GitHub CLIlatestPR creation, issue management, workflow dispatch
Python3.12Checkov IaC scanner and scripting
Node.js20Tooling and automation scripts
PowerShelllatestPSRule, ARM-TTK, and Azure PowerShell modules
Common utilities—Zsh with Oh My Zsh as default shell

Post-Create Setup​

The post-create.sh script runs automatically after the container is built and installs:

  • Checkov — IaC security scanner supporting ARM, Bicep, and Terraform templates.
  • PSRule for Azure — WAF-aligned validation rules for ARM and Bicep templates.
  • ARM-TTK — Microsoft's ARM Template Test Toolkit for template validation.

VS Code Extensions​

The following extensions are automatically installed in the container:

ExtensionPurpose
GitHub CopilotAI coding assistant
GitHub Copilot ChatChat-based AI assistance
Azure Resource GroupsBrowse and manage Azure resource groups
Azure FunctionsDevelop and deploy Azure Functions
Azure MCP ServerAzure MCP integration for Copilot agents
PSRuleRun PSRule validation from VS Code

VS Code Settings​

The Azure MCP server is preconfigured with:

  • azureMcp.serverMode: namespace — organizes tools by Azure service.
  • azureMcp.readOnly: false — allows read and write operations.

After Setup​

Once the environment is ready:

  1. Sign in to Azure: Run az login to authenticate. For Codespaces, az login --use-device-code works best.
  2. Verify the setup: Run az account show to confirm your subscription.
  3. Start using AutoCloud: Open Copilot Chat and try @autocloud deploy a Python function app.

Customization​

To add features or tools to the dev container:

  • Dev container features: Add entries to the features object in .devcontainer/devcontainer.json.
  • Post-create tools: Add installation commands to .devcontainer/post-create.sh.
  • VS Code extensions: Add extension IDs to customizations.vscode.extensions in .devcontainer/devcontainer.json.

Troubleshooting​

IssueSolution
Codespace build failsCheck the creation log for errors. Common cause: feature version conflicts.
az login fails in CodespacesUse az login --use-device-code for browser-based auth.
ARM-TTK not foundRun pwsh and verify the profile loaded: Get-Module arm-ttk -ListAvailable.
Checkov not foundRun pip install --user checkov manually.
Extensions missingReload the window (Ctrl+Shift+P → Developer: Reload Window).