Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
*What is terraform?
it is a open source tool.it is a software which enables to create ,change and improve infrastructure .terraform used to automate the provisioning of your cloud resources.it helps to automate infrastructure tasks.terraform facilitates your DevOps team to easily define, provision, and configure resources in on-premises and cloud servers efficiently .
*One example terraform program
install terraform.
create terraform.tf file and create a new file to add providers
and run terraform init
and create resources.tf file to add code and save the file.
one can use various terraform files like terraform plan,terraform apply,terraform show etc.one can add token for authentication
provider "github" {
token = "XXXXXX"
owner = "XXXXXX" }
resource "github_repository" "example" {
name = "example"
description = "My code"
visibility = "public"
}
* List of 5 terraform commands and its use
1.terraform init- initializes the (local) Terraform environment.
2.terraform plan- it describes Terraform’s default planning behavior, which isintended for changing the remote system to match with changes you’ve made toyour configuration
3.terraform apply-The terraform apply command executes the actions proposed in a Terraform plan
4.terraform show- The terraform show command is used to provide human-readable output from a state or plan file
5.terraform destroy- this command is used to destroy the Terraform-managed infrastructure.