Setting up Terraform and IBM Cloud Provider on Windows
This blog post is a quick guide on how to setup Terraform and IBM Cloud Provider on Windows operating system.
First of all, What is Terraform?
Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned. Defines infrastructure as code to increase operator productivity and transparency.
While working on our solution tutorial covering Infrastructure as code, we decided to add steps for setting up Terraform on Windows OS as well.
Setting up Terraform
Download and install Terraform Windows 64-bit.
Copy files from the downloaded zip to
C:\terraform (Create terraform folder).
Open the command prompt as an administrator and set the PATH to use terraform binaries.
Check Terraform installation by running
terraform. You should see a list of
Setting up IBM Cloud provider
Download the windows 64-bit IBM Cloud Provider plugin for your system and extract the archive. You should see the
On Windows, the file needs to be placed in
terraform.d/pluginsbeneath your user’s “Application Data” directory.Run the below commands on a command prompt Provider Configuration
Note: Replace PATH_TO_UNZIPPED_PROVIDER_FILE with the appropriate path on your machine.
Whenever you create a virtual machine (VM), you will need a public SSH key to access the VM created by the respective configuration. Download, install, launch Git Bash and run the below command to copy the public SSH key to your clipboard
The story doesn’t end here. In the tutorial, you will use a sample configuration to provision a Linux virtual server, with Apache web server, MySQL, and PHP server termed as LAMP stack. You will then update the configuration to add an Object Storage service and scale the resources to tune the environment (memory, CPU, and disk size). Finish by deleting all of the resources created by the configuration.