Friday, March 7, 2025

Terraform Introduction


Terraform Introduction:
Terraform helps user to build, manage or change infrastructure through code. 

Terraform Vs Ansible

IAC [Infrastrucure as code]
  • Manage infrastructure with the help of code
  • It's the code used to provision resources including virtual machines such as instances on AWS , Network infrastructure including gateways etc
  • You write and execute the code to define, deploy, update and destroy your infrastructure
  • Code is tracked in a SCM repository
  • Automation makes the provisioning process consistent, repeatable and updates fast and reliable.
  • Ability to programmatically deploy and configure resources
  • IAC standardize your deployment workflow
  • IAC can be shared, reused and versioned.
• IAC Tools:
    1.Terraform
    2.CloudFormation
    3.Azure Resource Manager
    4.Google Cloud Deployment Manager  
Terraform Overview:
Terraform is an Infrastructure Building Tool (Provisioning Infrastructure)
Written in Go Language
Integrates with configuration management and provisioning tools like Chef, Puppet and Ansible.
Extension of the file is .tf or .tf.json (Json Based)
Terraform maintain a state with the .tfstate extension
Deployment of infrastructure happens with a push-based approach (no agent to be installed on remote machines)
Terraform is Immutable. It can’t be changed after it’s created and destroy is the only option.
Terraform is using a Declarative method, Declarative Language is Describing what you're trying to achieve without instructing how to do it.
Terraform is Idempotent ,what ever looking for you which already is present means don't apply and exit without any changes.
Providers are services or systems that Terraform interacts with to build infrastructure on.
Current Terraform Version is 1.11
Terraform is cloud-agnostic but requires a specific provider for the cloud platform
Single Terraform configuration file can be used to manage multiple providers
Terraform can simplify both management and orchestration of deploying large-scale, multi-cloud infrastructure
Terraform is designed to work with both public cloud platforms and on-premises infrastructure (private cloud)
Terraform Workflow
        1.Scope 2.Author 3.Intilaize 4.Plan 5.Apply
 
Configuration file of Terraform:










No comments:

Post a Comment

GCP - VPC - part 2