Ad space (banner)
AD

Got the fundamentals? A structured Terraform course is a fast way to level up.

Find Terraform courses on Udemy

Affiliate link. Costs you nothing extra.

Lesson 14 / 37

Listing Resources with terraform state list

When you want a compact list of what is managed, use terraform state list. It prints just the addresses.

The syntax is terraform state list.

Running it prints one address per line, such as aws_instance.web and aws_s3_bucket.data.

A common stumble is expecting attributes here. This gives you names only; state show gives you the details.

In real work, it is how you find the exact address to pass to state show, taint or state rm.

Terraform
Try it (type this into the pseudo terminal)
terraform state list

🧑‍💻 You can type this command into the Terraform pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)