This is a brand new Persian Terraform free tutorial from @babakDoraniArab, contribute and improve this tutorial repo. There is a branch for each video on this repository that holds the codes that are written in the related video.
Also, if you would like to contribute just go and check the CONTRIBUTING.md file.
You can find your os related help for installation in below:
Linux
Debian/Ubuntu
Ensure that your system is up to date and you have installed the gnupg, software-properties-common, and curl packages installed. You will use these packages to verify HashiCorp's GPG signature and install HashiCorp's Debian package repository.
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
Install the HashiCorp GPG key.
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
Verify the key's fingerprint.
gpg --no-default-keyring \
--keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \
--fingerprint
The gpg command will report the key fingerprint:
/usr/share/keyrings/hashicorp-archive-keyring.gpg
-------------------------------------------------
pub rsa4096 XXXX-XX-XX [SC]
AAAA AAAA AAAA AAAA
uid [ unknown] HashiCorp Security (HashiCorp Package Signing) <[email protected]>
sub rsa4096 XXXX-XX-XX [E]
Add the official HashiCorp repository to your system. The lsb_release -cs command finds the distribution release codename for your current system, such as buster, groovy, or sid.
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
sudo tee /etc/apt/sources.list.d/hashicorp.list
Download the package information from HashiCorp.
sudo apt update
Install Terraform from the new repository.
sudo apt-get install terraform
CentOS/RHEL
Install yum-config-manager to manage your repositories.
sudo yum install -y yum-utils
Use yum-config-manager to add the official HashiCorp Linux repository.
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
Install Terraform from the new repository.
sudo yum -y install terraform
Fedora
Install dnf config-manager
to manage your repositories.
sudo dnf install -y dnf-plugins-core
Use dnf config-manager
to add the official HashiCorp Linux repository.
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
Install Terraform from the new repository.
sudo dnf -y install terraform
Amazon-linux
Install yum-config-manager to manage your repositories.
sudo yum install -y yum-utils
Use yum-config-manager to add the official HashiCorp Linux repository.
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
Install Terraform from the new repository.
sudo yum -y install terraform
Mac and Windows
Homebrew OS X
First, install the HashiCorp tap, a repository of all our Homebrew packages.
brew tap hashicorp/tap
Now, install Terraform with hashicorp/tap/terraform.
brew install hashicorp/tap/terraform
To update to the latest version of Terraform, first update Homebrew.
brew update
Then, run the upgrade command to download and use the latest Terraform version.
brew upgrade hashicorp/tap/terraform
Chocolatey on Windows
Chocolatey is a free and open-source package management system for Windows. Install the Terraform package from the command-line.
choco install terraform
Manual
To install Terraform, find the appropriate package for your system and download it as a zip archive.
After downloading Terraform, unzip the package. Terraform runs as a single binary named terraform
. Any other files in the package can be safely removed and Terraform will still function.
Finally, make sure that the terraform
binary is available on your PATH
. This process will differ depending on your operating system.
Mac or Linux
Print a colon-separated list of locations in your PATH.
echo $PATH
Move the Terraform binary to one of the listed locations. This command assumes that the binary is currently in your downloads folder and that your PATH
includes /usr/local/bin
, but you can customize it if your locations are different.
mv ~/Downloads/terraform /usr/local/bin/
For more detail about adding binaries to your path, see this Stack Overflow article.
Windows
This Stack Overflow article contains instructions for setting the PATH on Windows through the user interface.
Effective programming with TLS (Terraform Language Server) to have syntax highlighting, intellisense, code formatting and etc.
Name | Description |
---|---|
VsCode extension | Terraform Extension for Visual Studio Code |
Jetbrains IntelliJ-based IDEs extension | Terraform Extension for Pycharm and other IntelliJ-based IDEs |
LSP Mode | Aims to provide IDE-like experience by providing optional integration with the most popular Emacs packages like company, flycheck and projectile |
Infracost | Useful extension for VS-Code to see const estimate of your terraform right in your editor |
Leave a star on this repository and then subscribe to our Youtube channel. Be aware to turn on notification bell to get notified in case new video added.
Every episode codes are pushed to its related branch and you can check them below.
If you have difficulties to connect to youtube there is an alternative way, you can use tools like Invidious.
Episode | Name | branch | Youtube |
---|---|---|---|
001 | Introduction | - | watch |
002 | Why LaC | - | watch |
003 | Configuration management vs infrastructure orchestration | - | watch |
004 | Terraform Providers and basic AWS configuration to get programmatic access | 004 | watch |
005 | Create your first resource with terraform | 005 | watch |
006 | How to edit your resource and destroy your project | 006 | watch |
007 | Terraform variables and terraform variables | 007 | watch |
008 | Terraform variables and terraform variables | 008 | watch |
009 | Terraform remote backend | 009 | watch |
010 | terraform import and state rm | 010 | watch |
011 | terraform 011 create your first module | 011 | watch |
You can find related courses below here, You can use them to leverage your devops skills. Even you can use some of them for this tutorial too.
name | Github Repository | Youtube link | Description |
---|---|---|---|
آموزش راه اندازی AWS روی لوکال (LocalStack) | AWS local stack | Watch | You can simulate the aws services and use it for this course. |
Amazon cloud (AWS) | ---- | Watch | Learn the basics of aws |
AWS webinar | repository | Watch | Recorded webinars by Devops Hobbies for learning AWS. |