Destroying everything we've built

Destroying infrastructure with Terraform is as easy as or even easier than creating it. All you need to do is to run the terraform destroy command, as shown here: 

$> terraform destroy
Do you really want to destroy?
  Terraform will delete all your managed infrastructure.
  There is no undo. Only 'yes' will be accepted to confirm.
  Enter a value: 

Terraform is nice enough to ask you for a confirmation, in case you typed the terraform destroy command by accident:

aws_instance.hello-instance: Refreshing state... (ID: i-06f88fe6a2b4307b8)
aws_instance.hello-instance: Destroying...
aws_instance.hello-instance: Still destroying... (10s elapsed)
aws_instance.hello-instance: Still destroying... (20s elapsed)
aws_instance.hello-instance: ...

Get Getting Started with Terraform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.