Difference between revisions of "Terraform destroy"

From wikieduonline
Jump to navigation Jump to search
 
(15 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
* <code>terraform destroy</code>
 
* <code>terraform destroy</code>
 
* <code>[[terraform destroy -auto-approve]]</code>
 
* <code>[[terraform destroy -auto-approve]]</code>
* <code>terraform destroy -target=your_resource</code>
+
* <code>terraform destroy [[-target]]=your_resource</code>
 
* <code>terraform destroy [[-var-fil]]e="your_file.tfvars"</code>  
 
* <code>terraform destroy [[-var-fil]]e="your_file.tfvars"</code>  
 
* <code>[[terraform destroy --help]]</code>
 
* <code>[[terraform destroy --help]]</code>
Line 15: Line 15:
 
* [[Example execution terraform destroy aws_instance]]
 
* [[Example execution terraform destroy aws_instance]]
  
== Related commands ==
+
== Related ==
 
* <code>[[terraform show]]</code>
 
* <code>[[terraform show]]</code>
 
* <code>[[terraform apply]]</code>
 
* <code>[[terraform apply]]</code>
 +
* <code>[[terraform apply -destroy]]</code>
 +
* <code>[[terraform state rm]]</code>
 +
* <code>[[Still destroying...]]</code>
 +
* [[Destroy complete! Resources: 39 destroyed.]]
 +
* [[Acquiring state lock. This may take a few moments...]]
 +
 +
== Errors ==
 +
* <code>[[DependencyViolation]]: .../... has dependencies and cannot be deleted.</code>
 +
* <code>[[Error: deleting EBS Volume]]</code>
 +
* [[AWS Error: failed to refresh cached credentials]]
 +
* [[AWS Error: A Profile was specified along with the environment variables "AWS ACCESS KEY ID" and "AWS SECRET ACCESS KEY". The Profile is now used instead of the environment variable credentials.]]
  
 
==Related terms==
 
==Related terms==
*[[Example execution terraform destroy aws instance]]
+
* [[Example execution terraform destroy aws instance]]
 +
* [[Editing Error: 0m Error: ERROR cluster with name not found]]
 +
 
 +
== Activities ==
 +
* [[How to destroy all resources except one?]]
  
 
== See also ==
 
== See also ==
 
* {{terraform destroy}}
 
* {{terraform destroy}}
 
* {{tf files}}
 
* {{tf files}}
* {{terraform cmd}}
 
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 23:20, 11 February 2024

terraform destroy destroy all remote objects managed by a particular Terraform configuration.

https://www.terraform.io/docs/cli/commands/destroy.html

Examples[edit]

Executions examples[edit]

Related[edit]

Errors[edit]

Related terms[edit]

Activities[edit]

See also[edit]

Advertising: