Terraform Interview Questions and Answers
Related differences
Ques 21. Explain the purpose of 'terraform import'.
'terraform import' is used to import existing infrastructure into Terraform. It associates an existing resource with a Terraform resource configuration.
Ques 22. How does Terraform handle secrets in environment variables?
Terraform automatically masks sensitive information (like secrets) passed through environment variables in command output, making it more secure when dealing with secrets.
Ques 23. What is the purpose of the 'depends_on' attribute in Terraform?
The 'depends_on' attribute in Terraform is used to explicitly specify the order in which resources should be created. It creates a dependency relationship between resources.
Ques 24. Explain the use of 'terraform state mv' command.
'terraform state mv' is used to move a resource instance from one Terraform state file to another. It allows restructuring or reorganizing resources in the state.
Ques 25. What is 'terraform console' used for?
'terraform console' provides an interactive command-line interface for evaluating expressions and interpolations in the context of a Terraform configuration.
Most helpful rated by users: