Windows
This guide provides step-by-step instructions for installing and setting up the Cloud-to-Code CLI on Windows OS using either Docker or a standalone .exe
file. It also covers the installation of Terraform.
Docker
Click to view
Follow the steps below to set up the Cloud-to-Code CLI on Windows OS using Docker.
Before You Begin
- Recommended system requirements: 4 vCPU and 8 GB RAM.
- Install Docker Desktop on your Windows system. If you have installed Docker already, you can use the CLI directly from the Docker container.
Install Cloud-to-Code CLI
Open your Windows Terminal and run the following command to pull the latest version of the Cloud-to-Code CLI image:
docker pull ghcr.io/stackgenhq/cloud2code
If you do not have Windows Terminal installed, run the command:
winget install --id Microsoft.WindowsTerminal -e
Install Terraform
Check if you’ve installed Terraform by running the following command:
terraform version
To install Terraform, run the following command:
- Chocolatey
- Scoop
We recommend that you use Chocolatey for installing Terraform on Windows.
If you have Chocolatey installed, run:
choco install terraform
If you don’t have Chocolatey, install it from chocolatey.org.
Scoop is another Windows Package Manager that you can choose to install Terraform with.
Run the following command:
scoop install terraform
If you do not have Scoop installed, check out the scoop.sh documentation.
Using .exe
File
Click to view
1. Install Terraform
Check if you’ve installed Terraform by running the following command:
terraform version
To install Terraform, run the following command:
- Chocolatey
- Scoop
We recommend that you use Chocolatey for installing Terraform on Windows.
If you have Chocolatey installed, run:
choco install terraform
If you don’t have Chocolatey, install it from chocolatey.org.
Scoop is another Windows Package Manager that you can choose to install Terraform with.
Run the following command:
scoop install terraform
If you do not have Scoop installed, check out the scoop.sh documentation.
2. Downlodad cloud2code.exe
-
To Download the
.exe
file, click the link https://releases.stackgen.com/binaries/v0.2.9/cloud2code_0.2.9_windows_amd64.zip. -
To update your Cloud-to-Code CLI with the latest version, run the following command:
- Chocolatey
- Scoop
If you have Chocolatey installed, run:
choco upgrade stackgen cloud2code
If you don’t have Chocolatey, install it from chocolatey.org.
Run the following command:
scoop install terraform
If you do not have Scoop installed, check out the scoop.sh documentation.
3. Set up Cloud-to-Code CLI using .exe
To use the Cloud-to-Code CLI on Windows, add the folder containing the .exe
file to your System Environment Variables under the Path variable. This lets you to run the Cloud-to-Code CLI directly from the terminal window.
Follow these steps to set up the Cloud-to-Code CLI:
-
Extract the contents of the
.zip
file and save the executable (.exe
) files in a folder you want to add to your systemPATH
. -
Open Start and search for Edit the system environment variables, and then open it.
-
In the System Properties window, click Environment Variables.
-
Under User variables, find and select the Path variable, then click Edit.
-
In the Edit Environment Variable window, click New.
-
Paste the full folder path where the
.exe
file is stored (e.g.,C:\Tools\cloud2code
), then click OK to save. -
Restart your terminal and run the Cloud-to-Code CLI to confirm it works:
cloud2code --version
Your Cloud-to-Code installation is complete! To get started, follow the appropriate guide for your cloud provider to generate and deploy your infrastructure.