Skip to content

Commit cf09b2d

Browse files
authored
Merge pull request #40 from OpsLevel/db/main-readme
README high level overview
2 parents 51c0c16 + 65098d4 commit cf09b2d

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
**/.terraform/*
33

44
# .tfstate files
5-
*.tfstate
6-
*.tfstate.*
5+
**/*.tfstate*
6+
**/.terraform.lock.hcl
77

88
# Crash log files
99
crash.log
1010
crash.*.log
1111

1212
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
13-
# password, private keys, and other secrets. These should not be part of version
14-
# control as they are data points which are potentially sensitive and subject
13+
# password, private keys, and other secrets. These should not be part of version
14+
# control as they are data points which are potentially sensitive and subject
1515
# to change depending on the environment.
1616
*.tfvars
1717
*.tfvars.json

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
11
# OpsLevel Terraform Modules
2+
3+
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

Comments
 (0)