Get Started

Whether you’re a beginner or a seasoned DevOps professional, Cloudscript revolutionizes your deployment process by making it faster, simpler, and more intuitive.

Traditionally, Infrastructure as Code (IaC) demands expertise in multiple tools—Terraform for provisioning infrastructure, Ansible for configuration, and Kubernetes for container management—each with its own complex syntax and integration challenges.

Cloudscript streamlines IaC by offering a unified, easy-to-learn syntax. Write your infrastructure code once in Cloudscript, and it automatically compiles into the necessary Terraform, Ansible, and Kubernetes configurations ready for deployment. This seamless approach eliminates the hassle of juggling different languages and tools, allowing you to focus on building and scaling your applications with confidence.

Download the CLI and the VS Code extension to get started!

Download the Cloudscript CLI

The CLI allows you to convert, plan for, apply and destroy infrastructure. You can either download via Homebrew or the binary files directly.

Homebrew

Access our brew formula:

brew tap o37-autoforge/homebrew-cloudscript

Install Cloudscript:

brew install cloudscript

Confirm Installation:

cloud --version

Binary Files

You can find and download the binary files below

To confirm installation, execute the binary file directly from where it is located:

cloud-cli --version

From there you can add it to your path and give it the alias "cloud" for simplicity.

Download the VS Code Extension

Features

The Cloudscript VS Code extension provides basic language support, enabling developers to write, validate, and manage .cloud files efficiently.

  • Autocomplete: Whenever defining infrastructure, one of the most difficult parts is understanding what fields are required to be specified. With Cloudscript, when you enter in the "resource_type" field, it gives you a list of AWS, GCP and Azure components to choose from along with a template to make specifications simple.

  • Syntax Highlighting: Enhances code readability by highlighting Cloudscript keywords such as providers, service, infrastructure, configuration, containers, and deployment.

  • Comments and Bracket Support: Supports single-line comments (#) and provides basic bracket pairing and indentation rules for cleaner code structure.

  • Snippets: Includes a default template snippet for quickly scaffolding new .cloud files with essential blocks like type, providers, and service.

Requirements

  • Visual Studio Code: Latest version recommended.

  • Node.js and npm: Required if you plan on developing or testing the extension.

  • Basic Knowledge: Familiarity with IaC files and HCL syntax is beneficial.

Installation

  1. Open Extensions View in VS Code: Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS).

  2. Search for "Cloudscript": Type Cloudscript in the search bar.

  3. Install: Click the Install button next to the Cloudscript extension.

Usage

Automatic Syntax Highlighting: Open any file with the .cloud extension, and Cloudscript will automatically apply syntax highlighting.

(Note: the highlighting pattern heavily follows HCL's syntax along with specific .cloud key words)

Insert Default Template:

  1. Create a New .cloud File:

    • Right-click in the Explorer pane and select New File.

    • Name the file with a .cloud extension, e.g., main.cloud.

  2. Insert Template Snippet:

    • Type cloud-template and select the snippet from the suggestion list.

    • Alternatively, if enabled via the extension's logic, creating a new empty .cloud file may automatically insert the template

Default Template:

providers {}

service "name" {
  provider = ""

  infrastructure {}

  configuration {}

  containers {}

  deployment {}
}

Autocomplete Feature

When you are creating infrastructure components you can use the autocomplete feature. To use it, create a new infrastructure component, and add in an attribute called "resource_type" as shown below.

providers {}

service "name" {
  provider = ""

  infrastructure {
    compute "awesome" {
      resource_type =
    }
  }

  configuration {}

  containers {}

  deployment {}
}

The extension will then give you a list of resource types to choose from, and once you choose a resource type it gives you the option to "Insert Required Attributes". Here is an example of what autocomplete returns for a resource_type of "aws_instance"

providers {}

service "name" {
    provider = ""

    infrastructure {
        compute "awesome" {
            resource_type = "aws_instance" 
            instance_type = ""
            ami = ""
            subnet_id = ""
            vpc_security_group_ids = [""]
            tags = {
                Name = "awesome"
            }
            depends_on = [""]
        }
    }

    configuration {}

    containers {}

    deployment {}
}

Last updated