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)



  • Refer Here for the changes
  • 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


  • Refer Here for the changes
  • 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
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%%