> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use a GitOps workflow

Chronosphere Observability Platform lets users programmatically update many facets
of platform configuration using code tools like [Chronoctl](/tooling/chronoctl),
[Terraform](/tooling/infrastructure/terraform), and the
[Observability Platform API](/tooling/api-info).

Entities modified by Terraform and Chronoctl are viewable in Observability Platform,
but can't be modified. Use the **Code config** tool to review these entities and
understand working examples. You can copy and modify existing entities instead
of writing new configurations, which helps developers onboard faster and lets them
integrate changes into their existing
[GitOps workflows](https://about.gitlab.com/topics/gitops/).

This tool is available for create, read, update, and delete (CRUD) operations
for the following entities, and other supported entities:

* [Aggregation rules](/control/shaping/shape-metrics/rules)
* [Dashboards](/observe/dashboards)
* [Drop rules](/control/shaping/shape-metrics/rules/drop-rules)
* [Monitors](/investigate/alerts/monitors)
* [Signals](/investigate/alerts/notifications/signals)
* [Metric pools](/control/shaping/shape-metrics/quotas/manage-pools)

## Use the Code config tool

When adding or editing a supported entity, click the **Code config** tab to
view code representations. The displayed code also responds to changes you make
in the **Visual editor** tab.

When you modify an entity's properties in the **Visual editor** tab, click the
**Code config** tab to immediately see the updated code representations.

Changes you make in the **Visual editor** tab don't take effect until you click
**Save** or apply the code representations using their corresponding tools.

1. Sign in to Observability Platform.
2. Navigate to the section of Observability Platform where you want to make changes.
3. Select an existing entity, or create a new one.
4. Click the **Code config** tab or menu link. **Code config** is typically
   available in edit screens.
5. Select the code type:
   * **Terraform**
   * **Chronoctl**
   * **API**
6. To view a diff of unsaved changes you've made in the **Visual editor** tab, click
   **View Diff**. This button is available only if you've changed the monitor in the
   **Visual editor** tab but haven't saved your changes.

   This Git-style diff replaces the **Copy** and **Download** buttons with a toggle
   between **Unified** and **Split** diff styles, and the **View Diff** button with a
   **Hide Diff** button that returns you to the code representation view.

   You can also view unchanged lines in the context of the diff by clicking
   **Expand X lines** inside the diff.
7. Click **<Icon icon="copy" /> Copy** to copy the file, or
   **<Icon icon="download" /> Download** to download the file to your computer.
8. Apply the changes.

   <Tabs>
     <Tab title="Chronoctl" id="apply-config-chronoctl">
       1. Add the definition to a `.yaml` file.
       2. Use [`chronoctl apply`](/tooling/chronoctl#apply) to apply the changes.
     </Tab>

     <Tab title="Terraform" id="apply-config-terraform">
       1. Add the definition to a Terraform file, or create a new Terraform file.
       2. Run this command to apply the resource:

          ```shell theme={null}
          terraform apply
          ```
     </Tab>

     <Tab title="API" id="apply-config-api">
       Apply changes through the API by using the [appropriate endpoint](/tooling/api-info).
     </Tab>
   </Tabs>

   {/* vale PANW.Spelling = YES */}
