You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Customizable blueprint for creating and managing an [OpsLevel](https://opslevel.com) account and its resources using Terraform.
4
+
5
+
## Getting Started
6
+
7
+
Open a terminal and run the following:
8
+
9
+
```bash
10
+
brew install go-task
11
+
```
12
+
13
+
Once `task` is installed run `task --list` to see the available tasks.
14
+
15
+
### Layout
16
+
17
+
The `./modules` directory contains Terraform config files that make up the blueprint used to populate the OpsLevel account with data.
18
+
19
+
The `./workspace` directory contains the `main.tf` file that actually uses the contents in `./modules`. This is where inputs should
20
+
be defined to uniquely customize each account.
21
+
22
+
23
+
## Updating An OpsLevel Account
24
+
25
+
First, **ensure OPSLEVEL_API_TOKEN is set** via `export OPSLEVEL_API_TOKEN=<YOUR_API_TOKEN>` - this is how Terraform knows which account to update!
26
+
27
+
For a preview of planned changes,run `task plan`. No changes will be made with this command.
28
+
29
+
To apply changes, run `task apply`. This will refresh Terraform's state then prompt you for approval to apply changes.
30
+
31
+
> IMPORTANT: Managed resources/data are stored in Terraform's state, which is this local file `workspace/terraform.tfstate`. If this is lost, Terraform will not be able to properly apply changes.
32
+
33
+
### OpsLevel account Clean up
34
+
35
+
To remove all Terraform managed data, run `task destroy`. Terraform will prompt you for approval before deleting all managed resources.
0 commit comments