Terraform 面试题与答案
相关差异对比
问题 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.
问题 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.
问题 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.
问题 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.
问题 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.
用户评价最有帮助的内容: