> For the complete documentation index, see [llms.txt](https://experience-digital-transform.gitbook.io/experience-digital-transformation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://experience-digital-transform.gitbook.io/experience-digital-transformation/cloud-for-dpi/chapter-5/8-retire-an-environment.md).

# 8. Retire an environment

We retain both workload Spokes for Chapter 6. When an environment is no longer needed, its retirement begins with the applications and their data. We decide what must be retained, take and test the required backup, and stop application delivery. We then remove its shared route so that incoming requests are no longer sent to that destination.

The deployment repository preserves the review history of this change. Its Spoke ApplicationSet is configured to retain infrastructure when a directory disappears. The explicit teardown therefore remains a separate operation: it identifies this Spoke's owned resources, removes its infrastructure, verifies their absence and revokes its cloud identity. We check that the retained Spoke and shared LoadBalancer still serve their destinations. [\[9\]](https://git.vanillacore.net/govstack/govstack-bootstrap/src/commit/1195f539afe5a1018be07d2e1865824c225ee407/docs/spoke-lifecycle.md)

<figure><img src="https://1406653965-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkZFMZ3jCMUwHtTN0sL4J%2Fuploads%2Fgit-blob-c5639a967377b1d876b985840a2069129e756e66%2Ffinal.png?alt=media" alt="The retirement sequence targets example-workloads, with a data decision, removal of its route and declaration, followed by separately authorized infrastructure teardown and credential revocation. LoadBalancer and information-mediator remain."><figcaption><p>Figure 12. Retirement follows application, routing, infrastructure and identity dependencies for the selected Spoke.</p></figcaption></figure>

At the lab's pinned revision, the explicit teardown does not yet cover all rendered foundation destinations. The companion stops that operation pending a reviewed correction. The [retirement walkthrough](https://git.vanillacore.net/giga/content/src/branch/main/chapter-5/lab/walkthroughs/08-cleanup.md) records the stop and the resource checks needed to complete the sequence. [\[9\]](https://git.vanillacore.net/govstack/govstack-bootstrap/src/commit/1195f539afe5a1018be07d2e1865824c225ee407/docs/spoke-lifecycle.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://experience-digital-transform.gitbook.io/experience-digital-transformation/cloud-for-dpi/chapter-5/8-retire-an-environment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
