# Resources

One major benefit of specialized tools like Spacelift - as opposed to general-purpose CI/CD platforms - is that they intimately understand the material they're working with. With regards to infra-as-code, the most important part of this story is understanding your managed resources in-depth. Both from the current perspective, but also being able to put each resource in its historical context.

The Resources view is the result of multiple months of meticulous work understanding and documenting the lifecycle of each resource managed by Spacelift, regardless of the technology used - Terraform, Terragrunt, Pulumi or CloudFormation.

## Stack-level resources

This screen shows you the stack-level resources view. By default, resources are shown grouped in a hierarchical manner, grouped by parent. This allows you to see the structure of each of your infrastructure projects:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWe-iku_bBBTyEzAPEI%2FRuns_%C2%B7_Production_default_worker_pool.png?alt=media\&token=960a1030-9d80-4ec5-b0aa-bdc833c5a6b9)

Depending on the architecture as well as technology used, your tree may look slightly different - for example, Pulumi trees are generally deeper:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWe1Gyd1JHIDUadA0CQ%2FRuns_%C2%B7_Vendor_Releases_Watcher_and_Slack___checkout-com___Spacelift.png?alt=media\&token=c09a47ed-d12c-44a6-ae36-3bd637ce77ef)

Apart from being grouped by parent, resources can be grouped provider and type. Let's group one of our small stacks by provider:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWe2DPC3CHWgcQ__3k_%2FRuns_%C2%B7_Spacelift_preproduction_and_Slack___checkout-com___Spacelift.png?alt=media\&token=dc21812c-e3cb-435e-ac23-40a7388802ba)

We can see lots of AWS resources, a few from Stripe, and a lonely one from Datadog. Let's now filter just the Datadog ones, and group them by type:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWeLaLGIjfOpW-QZWRF%2F-MWeMBmaixbqESTSc-Px%2FRuns_%C2%B7_Spacelift_preproduction_and_Slack_____Pawe%C5%82_Hytry___Spacelift___1_new_item.png?alt=media\&token=6b022fc7-7ece-4a34-9036-ccdfaa696632)

Let's now take a look at one of the resources, for example a single `stripe_price`:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWeIrcIStlc6fC_MbHd%2FRuns_%C2%B7_Spacelift_preproduction.png?alt=media\&token=81123126-b947-4f2f-9785-f695425fc8a3)

The panel that is now showing on the right hand side of the Resources view shows the details of a single resource, which is now highlighted using a light blue overlay. On this panel, we see two noteworthy things.

Starting with the lower right hand corner, we have the vendor-specific representation of the resource. Note how for security purposes all string values are sanitized. In fact, we never get to see them directly - we only see first 7 characters of their checksum. If you know the possible value, you can easily do the comparison. If you don't, then the secret is safe. As a side note, we do not need to sanitize anything with Pulumi because the team there did an exceptional job with regards to secret management:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWeI0OgPrtN1o3RXAZ9%2FRuns_%C2%B7_Vendor_Releases_Watcher.png?alt=media\&token=b4718c14-2733-44ce-89fa-88b683dc04ca)

More importantly, though, you can drill down to see the runs that either created, or last updated each of the managed resources. Let's now go back to our stripe\_price, and click on the ID of the run shown in the _Last updated by_ section. You will notice a little menu pop up:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWeJo-HQcIqFthjHE4Y%2FRuns_%C2%B7_Spacelift_preproduction.png?alt=media\&token=58914754-8440-4415-b431-2dd4bc4d7885)

Clicking on this menu item will take you to the run in question:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWeKzyErMIAX82QBqMf%2FTag_all_Stripe_prices___398__%C2%B7_Spacelift_preproduction_and_1__local_dev__tmuxinator_start_spacelift.png?alt=media\&token=e649f556-ce6d-45c8-9420-3e5fc5fcb4fe)

One extra click on the commit SHA will take you to the GitHub commit. Depending on your Git flow, the commit may be linked to a Pull Request, giving you the ultimate visibility into the infrastructure change management process:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWdliFRcZu2nNgBX0rL%2F-MWeLZMzZHvWK3X5fup7%2FTag_all_Stripe_prices___398__%C2%B7_spacelift-io_infra_57d4958_and_1__local_dev__tmuxinator_start_spacelift.png?alt=media\&token=f02bafcd-e6d4-45ba-825a-3ce393f637a1)

### Navigating the resource tree

When grouping by resources parent - that is, seeing them as a tree, you can easily click into each subtree, like if you were changing your working directory. You can do this by clicking on the dot representing each node in the tree:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWeMDGMFywU5o7QtG-_%2F-MWeUCeIEmfPZrTYdW5n%2FRuns_%C2%B7_Spacelift_development.png?alt=media\&token=d42e3d52-fa0e-4128-b037-fdba0672f3eb)

Once you click into the subtree, you will be able to click out by clicking on the new virtual root, as if you were running `cd ..` in your terminal:&#x20;

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWeMDGMFywU5o7QtG-_%2F-MWeUwzp2TF3EvnX0P09%2FRuns_%C2%B7_Spacelift_development.png?alt=media\&token=cb3f486e-8b24-4156-9d25-7076ced3da2d)

One important aspect about navigating the resource tree is that once you click into the subtree, you are effectively filtering by the ancestor. Which means that grouping and filtering options will now operate on a subset of resources within that subtree:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWeMDGMFywU5o7QtG-_%2F-MWeVKY6M-IBBG_kbQ-b%2FRuns_%C2%B7_Spacelift_development.png?alt=media\&token=b998640f-7519-4ebe-96ef-979cbf326187)

## Account-level resources

{% hint style="warning" %}
Account-level resource view is still a work in progress, so some of the UX may change frequently.
{% endhint %}

A view similar to stack-level resources is available for the entire account, too. For this presentation we will use a very _symmetrical_ account - our automated testing instance repeatedly creating and updating the same types of resources in different ways to quickly detect potential regressions:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWeMDGMFywU5o7QtG-_%2F-MWeSIBDCXLI1tnU98bK%2FSpacelift.png?alt=media\&token=8777f3f8-adc5-42eb-aaa8-698cc6c7eb79)

By default we group by parent, giving you the same hierarchical view as for stack-level resources. But you will notice that there's a new common account root serving as a "virtual" parent for stacks.

In this view you can also filter and group by different properties, with one extra property being the Stack:

![](https://3862190545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LshwwDZmA4HXN0k9e8O%2F-MWeMDGMFywU5o7QtG-_%2F-MWeT56xb9A8kmXUvjrq%2FSpacelift_and_1__local_dev__tmuxinator_start_spacelift.png?alt=media\&token=62b1aedc-3659-4d0a-9ec8-08ecf6cd3c7b)

