If you have any instances running from prior steps in the getting started guide, use terraform destroy to destroy them, and remove all configuration files.
The Terraform Registry includes a directory of ready-to-use modules for various common purposes, which can serve as larger building-blocks for your infrastructure.
In this example, we’re going to use the Consul Terraform module for AWS, which will set up a complete Consul cluster. This and other modules can be found via the search feature on the Terraform Registry site.
Create a configuration file with the following contents: