Terraform Interview Questions and Answers
Related differences
Ques 11. What is Terraform's HCL?
HCL (HashiCorp Configuration Language) is the language used to write configuration files in Terraform. It is designed to be easy to read and write for both humans and machines.
Ques 12. How does Terraform handle dependencies between resources?
Terraform automatically handles dependencies between resources. It analyzes the resource graph and provisions resources in the correct order based on dependencies.
Ques 13. Explain the 'count' and 'for_each' meta-arguments in Terraform.
'count' is used to create multiple instances of a resource, while 'for_each' is used for creating multiple instances based on a map or set of values.
Ques 14. What is Terraform's interpolation syntax?
Interpolation syntax is used in Terraform to insert values into strings. Examples include '${}' for variable interpolation and '${resource.type.name}' for referencing resource attributes.
Ques 15. Explain the purpose of the 'locals' block in Terraform.
The 'locals' block in Terraform is used to define local variables within a module. These variables are not exposed to the calling module and are only accessible within the module's scope.
Most helpful rated by users: