DevOps Classroomnotes 19/Mar/2023

Terraform Contd

Hashicorp Configuration Language (HCL) for Terraform

  • For Specification Refer Here
  • Provider Refer Here
  • The terraform block helps in configuring the provider with version of the provider from registry Refer Here
  • Specify which version of terraform you should be using use required_version. To specify constraints Refer Here
  • Refer Here for changes

Parametrizing Terraform

Input Variables

  • Refer Here for input variables official docs
  • For inputs terraform supports the following types
    • number
    • string
    • boolean
    • list()
    • set()
    • map()
    • object({ = , … })
    • tuple([, …])
  • To pass variables while executing commands we have two options
    • -var
    • -var-file
  • using -var Refer Here
    • terraform apply -var "region=ap-south-2" -var "ntier-vpc-range=10.10.0.0/16"
  • Refer Here for the changes to use variables
  • using variable definitions Refer Here, example terraform apply -var-file values.tfvars
  • Refer Here for the changes in azure terraform template

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