Contents
Roadmap info from [roadmap website](https://roadmap.sh/terraform/local-exec provisioner@g2F5-nX4Aw-xWZiypNbnL)
The local-exec provisioner in Terraform allows the execution of local commands on the machine running Terraform after a resource is created. Itโs useful for tasks that need to be performed locally rather than on the remote resource. This provisioner can run scripts, update local files, or trigger local processes based on the creation of cloud resources. Common use cases include updating local inventories, triggering local notifications, or running local scripts that interact with the newly created resources. While powerful, it should be used judiciously as it can make Terraform operations dependent on the local environment. The local-exec provisioner doesnโt affect the resource itself and isnโt tracked in Terraformโs state, so itโs important to design these commands to be idempotent. Itโs best suited for simple, local operations that donโt require complex error handling or state management.