From the course: Developing Infrastructure as Code with Terraform
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Provisioners - Terraform Tutorial
From the course: Developing Infrastructure as Code with Terraform
Provisioners
- Provisioners are a legacy feature of Terraform, and they, they sort of blur the lines between infrastructure s-code and configuration management. So the use case originally was that you could do things like create a virtual machine and then have Terraform SSH into it or run Ansible or you know, puppet or something like that in order to configure that VM once it was up and running. HashiCorp recommends against using Provisioners for the most part, but they can be handy. So, sort of the most common use case that I see now is to use this local exec provisioners. So there are a number of different provisioners. There's an SSH provisioner, there's an Ansible provisioner, and those do still exist. This one is the one that I see used most commonly. And so, what we're doing here in this example is we're creating what's called a null resource. So this is a resource that doesn't do anything. It doesn't create anything, and we're just using it to run a shell script. So in this case, we're just…
Contents
-
-
-
-
-
-
(Locked)
Learning objectives47s
-
(Locked)
The basics: HCL structure1m 54s
-
Terraform providers4m 8s
-
(Locked)
Terraform data sources and resources4m 3s
-
(Locked)
Dependencies in Terraform7m 39s
-
(Locked)
About expressions in HCL12m 25s
-
(Locked)
Terraform variables and outputs9m 15s
-
(Locked)
Using for_each and count properties9m 47s
-
(Locked)
Resource lifecycle5m 53s
-
(Locked)
Refactoring features3m 15s
-
(Locked)
Provisioners3m 18s
-
(Locked)
-
-
-
-
-
-