/plushcap/analysis/spacelift/terraform-provisioners

Terraform Provisioners : Why You Should Avoid Them

What's this blog post about?

Terraform is a powerful IaC tool that helps build infrastructure using code and can perform tasks when an EC2 instance boots or is destroyed through provisioners. However, Hashicorp suggests the usage of Terraform provisioners should only be considered in cases where there are no other options available. The local-exec provisioner executes shell commands on the host system, while the file provisioner copies files from the host machine to target resources. The remote-exec provisioner runs commands on the target EC2 instance instead of the Terraform host. These provisioners should be used as a last resort due to their limitations and potential security risks. Instead, rely on configuration management software like Chef, Puppet, Ansible, etc., for such tasks.

Company
Spacelift

Date published
Aug. 31, 2022

Author(s)
Sumeet Ninawe

Word count
3545

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.