Skip to main content

Azure Getting Started

This document describes how to get started with GruCloud on Azure.

Use Cases





Azure Account

Visit the azure portal and ensure you have an azure account as well as a subscription.

Azure CLI

Install the Azure Command-Line Interface az from here

At this point, ensure the az command is installed:

az --version

Installing the GruCloud CLI

The GruCloud CLI, gc, is written in Javascript running on Node.js

Install it globally with:

npm i -g @grucloud/core


GruCloud CLI commands

gc new Create a new project

Use the new command to create a new project:


The boilerplate project is now created and configured.

gc list List the live resources

Visualize your current infrastructure with the list command:

gc list --graph


gc gencode Generate the code

The gencode command fetches the live resources and generate the code in resource.js

gc gencode

The following flowchart explains in more detail the process of generating the code from the live infrastructure.


gc graph Target Graph

The graph command creates a dependency graph of the target resources:

gc graph


The graph command requires graphviz to convert the generated artifacts/ into an image such as artifacts/diagram-target.svg

gc apply Update the resources

To update the infrastructure, either use the Azure portal and run gc gencode, or modify directly the file resource.js. Once done, use the apply command to update the infrastructure:

gc apply

gc destroy Destroy the resources

To destroy the infrastructure, use the destroy command:

gc destroy

Next Steps