IAAC — Terraform Fundamentals Part2

  • Introduction to variables in Terraform.
  • Usage of String type of variable with Terraform.
  • Usage of Number type of variable with Terraform.
  • Usage of Bool type of variables with Terraform.
  • Usage of List type of variable with Terraform.
  • Usage of Tuple type of variable with Terraform.
  • Usage of Map type of variable with Terraform.
  • Usage of (local_provider + random_provider) plugins together with Terraform.
  • Here is how the usage of variables being defined for filename and content.
  • ResourceType being used here is “local_file”.
  • ResourceName being used here is “sample_res”.
  • fileName1 → This variable defines the name of the file.
  • contentStringTypeVar → This variable defines the content to be put into the file.
  • The new file named “newFIleThruVar.txt” has been generated and old file has been auto-deleted.
  • Also, see the contents of the file now contains the number, as suggested in Step #1.
  • random_string → This resourceType comes from “random provider” plugin.
  • local_file → This resourceType comes from “local provider” plugin. Also, this resource refers to the resource of random_string type.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
aditya goel

aditya goel

Software Engineer for Big Data distributed systems