Back to articles
Terraform Provisioners — Interview Q&A
How-ToDevOps

Terraform Provisioners — Interview Q&A

via Dev.toAisalkyn Aidarova

1. What is a provisioner in Terraform? Answer: Provisioners allow Terraform to execute commands locally or on remote resources after infrastructure is created. 2. What problem do provisioners solve? Answer: Terraform creates infrastructure but does not configure it. Provisioners handle post-creation tasks like installing software and configuring servers. 3. What are the types of provisioners? Answer: local-exec → runs on local machine remote-exec → runs on remote server via SSH file → copies files to remote server 4. Difference between local-exec and remote-exec? Answer: local-exec runs on the machine where Terraform executes, while remote-exec runs inside the created resource using SSH. 5. Does local-exec require SSH? Answer: No. It runs locally and does not connect to the remote server. 6. What is required for remote-exec? Answer: SSH access Username Private key Public IP or hostname 7. What is the connection block? Answer: It defines how Terraform connects to a remote resource, incl

Continue reading on Dev.to

Opens in a new tab

Read Full Article
1 views

Related Articles