Menu
  • Home
  • About Me
  • Blog
  • Github
  • LinkedIn

Update tf1.3v

October 31, 2022October 31, 2022

#-------------------------------------------------------------------------------------------------------
# Set terraform version and providers
#-------------------------------------------------------------------------------------------------------

terraform {
  required_version = ">= 1.3.0"
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">=3.0.0"
    }
  }
}

provider "azurerm" {
  features {
    resource_group {
      prevent_deletion_if_contains_resources = false
    }
  }
}

Install Terraform on wsl

Open Ubuntu application (or your installed distro)

Run the following command which will install unzip (its my preference to extract files)

sudo apt-get install unzip

Navigate to the Terraform download page and grab the most recent download URL.

Using the above URL, run the following commands which will download, unzip, move the binary to users bin.

wget <terraform_url> -O terraform.zip;
unzip terraform.zip;
sudo mv terraform /usr/local/bin;
rm terraform.zip;

The recommend using the following commands to install Terraform. It skip validating certificate, so we are able to install Terraform without any unexpected error:

TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \"\,\v | awk '{$1=$1};1'`

wget --no-check-certificate https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip
unzip terraform.zip; 
unzip terraform_${TER_VER}_linux_amd64.zip 
sudo mv terraform /usr/local/bin/

rm terraform_${TER_VER}_linux_amd64.zip

Run the following command to verify terraform is installed.

reference: Configuring Terraform on Windows 10 Linux Sub-System

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts
  • ChinguTalkBot v0.1.0: Setting up AWS Cognito with CDK for User Authentication
  • Phoenix & Elixir: Fix PostgreSQL connection refused
  • Demo: Git Log with Shell script to create a release notes
  • Metasploit
  • CyberSecurity Lab – Online Password Attack

Archives
  • March 2024
  • May 2023
  • April 2023
  • February 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
Categories
  • Amazon Interview (3)
  • Ansible (3)
  • AWS (9)
  • Azure (9)
  • Certification (2)
  • ChinguTalkBot Project (1)
  • cybersecurity (3)
  • Data analytics (6)
  • Demo Videos (6)
  • Docker (5)
  • Git (1)
  • GitLab (1)
  • Golang (3)
  • JavaScript (2)
  • Jenkins (4)
  • PowerShell (1)
  • Python (10)
  • Terraform (11)
  • Uncategorized (9)

©2025 | Powered by WordPress and Superb Themes!