DevOps Classroomnotes 02/Aug/2023

Terraform contd

ntier network in AWS

  • Manual steps:
    • Create a vpc
      • network: 10.10.0.0/16 => 10.10.x.x ( 10.10.0.0 to 10.10.255.255)
        Preview
        Preview
        Preview
        Preview
  • Refer Here for the changes
    Preview
  • After terraform apply we are observing three new files

    • .teraform.lock.hcl
    • terraform.tfstate
    • terraform.tfstate.backup
  • Lets add one subnet

    • cidr: 10.10.0.0/24 => 10.10.0.x => 10.10.0.0 to 10.10.0.255
    • name: web 1
      Preview
      Preview
      Preview
  • Refer Here for the changes
    Preview
  • Exercise: Try adding 5 more subnets
web2: 10.10.1.0/24
db1: 10.10.2.0/24
db2: 10.10.3.0/24
app1: 10.10.4.0/24
app2: 10.10.5.0/24

Concepts

  • Refer Here for terraform locals
  • Terraform works:
    • Terraform when applied tries to figure out a plan to make the desired state an actual state (terraform plan)
    • Terraform creates a file called as terraform.tfstate when it first creates some resource
    • Terraform stores the information about the created resources in a json format called as tfstate
    • terraform refresh updates the tfstate according to actual state
      Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube