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-cloudscriptInstall Cloudscript:
brew install cloudscriptConfirm Installation:
cloud --versionBinary 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 --versionFrom 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, anddeployment.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
.cloudfiles with essential blocks liketype,providers, andservice.
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
Open Extensions View in VS Code: Press
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(macOS).Search for "Cloudscript": Type
Cloudscriptin the search bar.Install: Click the
Installbutton 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:
Create a New
.cloudFile:Right-click in the Explorer pane and select
New File.Name the file with a
.cloudextension, e.g.,main.cloud.
Insert Template Snippet:
Type
cloud-templateand select the snippet from the suggestion list.Alternatively, if enabled via the extension's logic, creating a new empty
.cloudfile 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