Menu
  • Home
  • About Me
  • Blog
  • Github
  • LinkedIn

Terraform Certification – What is terraform?

July 11, 2022July 11, 2022

Terraform is an example of a declarative approach to deploying Infrastructure as Code. other core concepts are:

  • consistency: Each time you do something, the results should be the same
  • idempotent: If you haven’t changed anything about your code, nothing will change in the environment
  • Push or Pull: Terraform is a push-type model, the configuration that terraform has is getting pushed to the target environment.

Terraform Object Types

  • Provider: blocks define information about a provider you want to use
  • Resources: things you want to create in a target environment
  • Data sources: a way to query information from a provider

Block Syntax

HashiCorp configuration language uses block syntax for everything in the file. It’s a simplified version of JSON that is easier to read and it supports inline comments.

Each block is going to start with the block type keyword that describes what type of object is being described in the block.

block_type "lable" "name_label" {
  key = "value"
}

// define object type, type of resource, and name label
resource "aws_instance" "web_server" {
  name = "web-server"
  // we could use a nested block to specify an ebs_volume
  ebs_volume {
    size = 40
  }
}
    

Terraform Object Reference

<resource_type>.<name_label>.<attribute>
aws_instance.web_server.name

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts
  • ChinguTalkBot v0.1.0: Setting up AWS Cognito with CDK for User Authentication
  • Phoenix & Elixir: Fix PostgreSQL connection refused
  • Demo: Git Log with Shell script to create a release notes
  • Metasploit
  • CyberSecurity Lab – Online Password Attack

Archives
  • March 2024
  • May 2023
  • April 2023
  • February 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
Categories
  • Amazon Interview (3)
  • Ansible (3)
  • AWS (9)
  • Azure (9)
  • Certification (2)
  • ChinguTalkBot Project (1)
  • cybersecurity (3)
  • Data analytics (6)
  • Demo Videos (6)
  • Docker (5)
  • Git (1)
  • GitLab (1)
  • Golang (3)
  • JavaScript (2)
  • Jenkins (4)
  • PowerShell (1)
  • Python (10)
  • Terraform (11)
  • Uncategorized (9)

©2025 | Powered by WordPress and Superb Themes!