Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.14 KB

README.md

File metadata and controls

35 lines (22 loc) · 1.14 KB

QuickStart

Initialise

The terraform init command is used to initialize a working directory containing Terraform configuration files. This is the first command that should be run after writing a new Terraform configuration or cloning an existing one from version control. It is safe to run this command multiple times.

terraform init

Applying a Plan

The terraform plan command is used to create an execution plan. Terraform performs a refresh, unless explicitly disabled, and then determines what actions are necessary to achieve the desired state specified in the configuration files.

Now that we're ready to create our resources, let's generate a plan file.

terraform plan -out=<terraform>.tfplan

Now we can safely change our configuration files, and as long as we don't re-create our plan, we can be sure that this is all that's going to be applied.

Let's finally give that a go, run the following command:

terraform apply <terraform>.tfplan

Destroy Infrastructure

We've now seen how to build and change infrastructure. You can cleanup the Terraform-managed infrastructure.

terraform destroy -force