Search⌘ K
AI Features

Introduction

Explore how Terraform provisioners enable local and remote configuration of resources. Understand the difference between local-exec and remote-exec provisioners, their syntax, and practical examples such as managing EC2 instances. Learn when and how to apply provisioners in pre- and post-deployment scenarios to automate setup and configuration.

Overview

When we set up resources, we may need to configure them afterward. We can use a couple of ways to manage our resource configuration, and Terraform provisioners are one of these methods.

Terraform provisioners
Terraform provisioners

What are provisioners?

Provisioners are used to help us with the provisioning of our resources via Terraform. The basic syntax is as below:

Shell
provisioner "type" {
# configuration options for the provisioner
}

Types of provisioners

Provisioners can be of two types, local-exec provisioners and remote-exec ...