DevOps Classroomnotes 26/Jul/2023

Architecture of Terraform

  • Terraform is developed in Go language and installation of terraform is one executable
  • Providers are not part of terraform installations as we try to create infra, as part of initializations providers are downloaded
  • Providers have resources and datasources as part of it

Concepts of Terraform

  • Provider: This determines the target area to create infra structure
  • Terraform providers are of three categories
    • official
    • partner
    • community
  • Refer Here for providers documenation by hashicorp
  • Note: For you reference we have used the following template
terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      version = "2.33.0"
    }
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=3.0.0"
    }
  }
}

provider "azurerm" {
    features {

    }
}

provider "aws" {
    region = "us-west-2"
}

resource "aws_instance" "fromtf" {
    ami = "ami-03f65b8614a860c29"
    tags = {
      Name ="from terraform"
    }
    key_name = "my_id_rsa"
    vpc_security_group_ids = ["sg-05adaf452b268c335"]
    instance_type = "t2.micro"

}


resource "azurerm_resource_group" "test" {
    name = "test"
    location = "eastus"

}
  • Arguments and Attributes:
    • Argument refers to inputs in terraform
    • Attributes refers to outputs in terraform
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%