DevOps Classroom notes 05/Nov/2025

Scenario – 1: Ntier application infra – AWS

  • N tier application
  • AWS
  • Concepts:
    • AZ
    • CIDR
  • Ips reserved for private usage
    • 10.0.0.0 to 10.255.255.255
    • 172.16.0.0 to 172.31.255.255
    • 192.168.0.0 to 192.168.255.255
  • Manual Creation: Watch classroom recording

Working with terraform

  • Where are we creating these resources (Provider) => aws
    • account => <your account>
  • What are we creating (resources)
  • vpc
    • cidr: 192.168.0.0/16
    • Tag:
      • Key: Name
      • Value: from-tf
  • subnets
    • web
      • Tag:
        • Key: Name
        • Value: web
      • CIDR: 192.168.0.0/24
      • AZ: ap-south-1a
    • app
      • Tag:
        • Key: Name
        • Value: app
      • CIDR: 192.168.1.0/24
      • AZ: ap-south-1a
    • db
      • Tag:
        • Key: Name
        • Value: db
      • CIDR: 192.168.2.0/24
      • AZ: ap-south-1a
  • internet-gateway
  • route table:
    • private:
      • Tag:
        • Key: Name
        • Value: private
      • subnet associations:
        • app
        • db
    • public
      • Tag:
        • Key: Name
        • Value: public
      • Route:
        • 0.0.0.0/0 -> igw
      • subnet associations:
        • web
  • Order of creation:
    • vpc
      • subnets
      • igw
      • routetables

Configuring aws credentials with terraform

  • For this we use aws cli and create a IAM user for terraform (Watch classroom recording)

working with Terrraform

  • Create a new folder aws-ntier
  • open this folder in vscode
  • create a file called as providers.tf in which we configure terraform block and providers

HCL (Haschicorp configuration language)

  • Block: generally blocks will be enclosed in { }
    • We have providers block, resources block, datasource block, outputs block, terraform block
    • syntax
      <block-type> {
      arg1 = value1
      ..
      argn = valuen
      }
  • Providers block
provider "<PROVIDER_NAME>" {
  <PROVIDER_ARGUMENTS>
  alias   = "<ALIAS_NAME>"

}
provider "aws" {
    region = "ap-south-1"

}
  • Once the providers is definied execute terraform init
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%