Terraform
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
What is terraform?
It is an open source infrastructure as code software tool that allows to programmatically provision the physical resources an application requires to run.
Example
//provider code for github provider
provider “github” {
token = “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”
owner = “Jayesh”
}
//resource code
resource “github_repository” “example” {
name = “test”
description = “test repo”
visibility = “public”
}
5 terraform commands
- init :Used to initialize provider
- plan : Used to create a execution plan.
- apply: It executes the actions proposed in plan commands.
- show : Used to display the contents of repository
- destroy : Used to destroy the repository.