π Terraform Series β Day 2

Search for a command to run...

No comments yet. Be the first to comment.
π Terraform Series β Automate Your Infrastructure Starting a complete **Terraform series** where Iβll cover everything from **basic to advanced level** with real-world practicals. In this series, you will learn: β’ What is Infrastructure as Code (IaC) & why it matters β’ Terraform fundamentals (providers, resources, state) β’ Writing and managing Terraform configurations β’ Variables, outputs & modules β’ Remote state & state management β’ Provisioning infrastructure on AWS β’ Automation & real-world use cases β’ Advanced concepts like workspaces, modules, and best practices π― Goal: Help you automate infrastructure and become job-ready in DevOps. Perfect for **beginners, students, and DevOps learners** who want hands-on experience. Stay tuned and letβs build infrastructure the smart way β‘π» #Terraform #DevOps #Cloud #AWS #InfrastructureAsCode #Automation
Terraform Blocks, Labels, and Arguments In Day 2, we installed Terraform.Now, before writing real infrastructure code, we must understand how Terraform actually reads and executes configurations. π E
Master GitLab CI/CD Variables, Secrets Management, Artifacts & Best Practices π Introduction In the previous article, we learned how GitLab Runners execute CI/CD pipelines and how to configure Self-H

Learn GitLab Runners, Hosted vs Self-Hosted Runners, Runner Registration, Tags, Pipeline Editor & Parallel Jobs π Introduction In the previous article, we created our first GitLab CI/CD pipeline and

Learn Continuous Integration, Continuous Delivery, Pipelines, Stages, Jobs & .gitlab-ci.yml π Introduction In the previous articles, we explored GitLab fundamentals, repository management, and collab

Learn Docker Scout, Multi-Stage Builds, Docker Hardened Images (DHI), SBOM, Docker Model Runner, Ask Gordon AI, and production-ready container security through practical, real-world examples. Introduc

Import Repositories, Mirroring & Repository Management Best Practices π Introduction In the previous articles, we learned the fundamentals of GitLab, created projects, and configured secure authentic

In Day 1, we understood the fundamentals of Terraform and Infrastructure as Code (IaC).
Now, in Day 2, we will set up Terraform in real environments.
This guide covers installation on:
AWS EC2 (Ubuntu)
Local Ubuntu Machine
Windows (using Chocolatey)
Install Terraform in different environments
Follow secure installation practices
Verify installation properly
Go to AWS EC2 Dashboard
Click Launch Instance
Select:
OS β Ubuntu
Instance Type β t2.micro (Free Tier)
Create key pair
Launch instance
ssh -i your-key.pem ubuntu@your-ec2-public-ip
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null
gpg --no-default-keyring \
--keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \
--fingerprint
π Ensures authenticity and security
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
sudo apt-get update
sudo apt-get install terraform
terraform --version
π Follow the same steps as EC2
No changes required β works exactly the same.
choco install terraform
π Make sure Chocolatey is installed on your system
Open a new terminal (CMD/PowerShell):
terraform -help
Expected output:
Usage: terraform [global options] <subcommand> [args]
π Shows all available Terraform commands
touch ~/.bashrc
terraform -install-autocomplete
touch ~/.zshrc
terraform -install-autocomplete
π Restart terminal after this step
You can also install Terraform using the official HashiCorp documentation depending on your OS and requirements.
Terraform official Documentation
βThis Kubernetes series focuses on building a strong foundation by understanding real Kubernetes concepts step by step.β
π§ Email: gujjarapurv181@gmail.com
π GitHub: github.com/ApurvGujjar07
πΌ LinkedIn: linkedin.com/in/apurv-gujjar