DevOps Classroomnotes 12/Aug/2023

Terraform contd

Provisioners in Terraform

  • Refer Here for terraform provisioner offical docs
  • Provisioner types
    • file: This can copy file into remote machine created by terraform
    • local-exec: this executes in the machine where terraform is executed
    • remote-exec: This executes in resource created by terraform
  • Provisioner Connection: To establish remote connection, we need to pass connection information Refer Here

ntier – aws. Install apache in ec2

  • manual steps for installing spring petclinic
sudo apt update
sudo apt install openjdk-11-jdk -y
cd /tmp && wget https://referenceapplicationskhaja.s3.us-west-2.amazonaws.com/spring-petclinic-2.4.2.jar
java -jar /tmp/spring-petclinic-2.4.2.jar &

Realizing using terraform

ntier – azure.

  • Refer Here for the latest changeset and try to execute and see the results
  • Try create a web vm or web ec2 and install apache in it
sudo apt update && sudo apt install apache2 -y

Concept – Backend

  • Refer Here for official docs
  • Terraform by default stores the state locally so multi user execution will create problems
  • The default backend is local backend
  • There are many other available backends Refer Here
  • Next Steps:

    • Backend
    • Workspace
    • Modules and registry
    • state management:
      • import
      • state loss scenarios

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner